netsender POST requests fail when talking to dev_appserver.py
Issue #11
resolved
POSTing data to dev_appserver.py using http.Client fails with the following message:
Unsolicited response received on idle HTTP channel starting with "HTTP/1.1 400 Bad Request
Note, this is NOT returned as a Go error, but simply spewed to stdout by Go's default logger.
Whether a bug in Go or a bug in devappserver.py is moot, since it is blocking standalone testing of our App Engine services.
Comments (3)
-
-
reporter Added dev_appserver/POST workaround in httpRequest which addresses Issue
#11.→ <<cset 0b4242fd094e>>
-
reporter - changed status to resolved
- Log in to comment
I have a strong suspicion this is the same as bitbucket.org/ausocean/av/issues/11 (I'd like to write ausocean/av
#11, but that doesn't work); that issue also related to POST. In the related email discussion (starting 2018-12-11) I linked that to https://github.com/golang/go/issues/18117. See this code.If that is the case, the fix (for want of a better word) it to buffer the write into a
*bytes.Buffer
and use thatio.Reader
to hand to the POST. Alternatively, find where in dev_appserver.py it's misunderestimating the length of the body.