Closed michal-niklas closed 7 years ago
Can you confirm that Jetty requires a content-length by manually setting the content-length header yourself in the request to see if that works?
Yes, when I add that header:
conn.request('POST', path_and_qry, body=body, headers={'content-length': '11'})
I got response with data read from the query body.
Ok, so this is a duplicate of #206. If you'd like to pick up the patch from that issue and resolve my concerns with it from that bug report, I'll happily review that fix. =)
I have build simple HTTP, HTTPS and HTTP/2 client based on Python hyper library. When I test it on my Jetty based WebService I see that hyper HTTP/2 client do not send POST data like HTTP and HTTPS.
My code looks like:
Of course you have to add your own WebService url and CA file.
To test it with HTTP/2 you must uncomment line:
To test it with HTTPS you must comment it.
My results:
Of course my WebService works well with Chrome and Firefox using HTTP/2.
I have found similar problem: https://github.com/Lukasa/hyper/issues/206
When I use HTTP/2 client it probably do not send Content-Length header. With other clients I receive: http_content_length=11
I test it with hyper 0.7 on Fedora Linux with Python 2.7.13 and Python 3.5.3.