vulcand / oxy

Go middlewares for HTTP servers & proxies
Apache License 2.0
2.02k stars 324 forks source link

buffer: fix typo in hijack algorithm #228

Closed kevinpollet closed 1 year ago

kevinpollet commented 1 year ago

What does this PR do?

This pull request fixes a typo in the Hijack algorithm. The hijack boolean must be set to true when the connection is hijacked not the opposite. This allows disabling buffering for hijacked connections (see https://github.com/vulcand/oxy/blob/master/buffer/buffer.go#L282).

Additional Notes

Co-authored-by: Mathieu Lonjaret mathieu.lonjaret@gmail.com