Closed patcher-ms closed 1 year ago
@acouvreur do you have any thoughts on this?
Sorry for the ping, earlier you replied to my other issue and I wanted to make sure this PR didn’t fall through the cracks :)
Will check if any side effect might occur without sending the content length
But I might merge it soon :)
:tada: This PR is included in version 1.4.0-beta.7 :tada:
The release is available on:
v1.4.0-beta.7
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 1.4.0 :tada:
The release is available on:
v1.4.0
Your semantic-release bot :package::rocket:
@all-contributors please add @patcher-ms for bug and code
@acouvreur
@patcher-ms already contributed before to bug, code
I continued my investigation of issue https://github.com/acouvreur/sablier/issues/165 and I discovered that when making a working request these are the headers seen by cURL:
Note that
Content-Length
is not present. https://stackoverflow.com/questions/75091383/why-does-golang-http-responsewriter-auto-add-content-length-if-its-no-more-than talks about this and describes what's going on.Apparently this is not an issue for HTTP/1.1 connections, which are used by cURL and the browsers when there is no TLS involved. When the request is HTTPs cURL and browsers prefer to use h2, which I guess handle headers in a different ways.
If I force cURL to use HTTP1.1 I get the loading page even for TLS requests, so this is definitely and issue related to h2. Anyway,
Content-Length
is never explicitly set inserveDynamic
and loading pages tend to be above the threshold so I think not propagating it is the right fix for the issue.