benoitc / hackney

simple HTTP client in Erlang
Other
1.34k stars 427 forks source link

Handle Connection: close response header for streams #611

Closed Kuroneer closed 4 years ago

Kuroneer commented 4 years ago

Due to stream's client not storing the Headers, hackney_response:maybe_close ignores the "Connection: close" response header. This causes that a soon-to-be-closed socket is put back in the pool, potentionally being delivered to other client.

With these changes, hackney_response:maybe_close handles the way hackney_stream stores the connection value