Skip to content

Conversation

@carlonluca
Copy link
Contributor

No description provided.

@carlonluca
Copy link
Contributor Author

When placing mldonkey behind a reverse proxy it happens that some requests fail because there is a duplicate "Content-Length" header. My knowledge of ocaml is insufficient to state that simply removing it here is sufficient, but it does not seem that symbol is used often.

@ygrek
Copy link
Owner

ygrek commented Aug 17, 2024

to reproduce :

$ curl -v http://127.0.0.1:4080/bw_updown.png
*   Trying 127.0.0.1:4080...
* Connected to 127.0.0.1 (127.0.0.1) port 4080 (#0)
> GET /bw_updown.png HTTP/1.1
> Host: 127.0.0.1:4080
> User-Agent: curl/7.88.1
> Accept: */*
> Accept-Encoding: deflate, gzip, br, zstd
> 
< HTTP/1.1 200 OK
< Server: MLdonkey/3.1.7.git
< Connection: close
< Content-Type: image/png
< Accept-Ranges: bytes
< Content-Length: 1716
< Cache-Control: no-cache
< Pragma: no-cache
< Content-length: 1716

@ygrek
Copy link
Owner

ygrek commented Aug 17, 2024

content-length header is added uniformly in http_server.ml, so this function is indeed not needed

@ygrek ygrek closed this in b80c733 Aug 17, 2024
carlonluca referenced this pull request in carlonluca/mldonkey Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants