machinezone / IXWebSocket

websocket and http client and server library, with TLS support and very few dependencies
BSD 3-Clause "New" or "Revised" License
512 stars 167 forks source link

Fix #286 - http response headers overwritten with request headers #483

Closed glenne closed 10 months ago

glenne commented 10 months ago

Not sure why it was copying request headers to the response so I took that out altogether. Response headers should be determined by the server and not parroted from the client. For example, Accept-Encoding and Content-Encoding should be set by the server and not the client as it was before. With removal of the blind copy of request headers, I added explicit setting of Content-Encoding for the gzip ifdef case and added a test to verify it was set.

bsergean commented 10 months ago

looking good, thanks @glenne