Closed zorael closed 2 years ago
I'd have to double check the spec but it is probably my bug. I have
if(requestParameters.bodyData.length)
And it should probably instead be if the request is a POST or PUT or PATCH.... so this was jsut my shortcut cuz I wouldn't set things otherwise.
https://httpwg.org/specs/rfc7230.html#header.content-length
ok yeah the spec says it should be there for the posts and such, but not there for gets. let me check the others then push up a patch.
test it with the master now plz. you can see in the commit it was an easy patch
Yes, it seems to work now. Thanks!
excellent.
I was attempting to access the Google API1, which at one point requires a POST request with some query params (where the body can be left empty) to get an OAuth access token.
I could work around it by passing a dummy body
ubyte[]
with just"{}"
, or by manually setting aContent-Length: 0
header.Should empty-body POSTs get a
Content-Length
too, or am I doing it wrong? Should I expect to have to work around it in these cases?