Net/http: POST content-length != body-length

I am making POST requests to a website using the net/http module. Normally it works fine but sometimes I get the following error (message):
Post "<URL>": http: ContentLength=47 with Body length 0

Is this a problem with the server or my code?

We know neither the server, not your code. Therefore it is very hard to say…

Digging into the standard library source code, the error is created here.
I could share my code if its necessary, but I am asking if there is a known (perhaps common) condition/reason that this error is triggered (returned, that is)?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.