Am 09.03.23 um 11:29 schrieb Stefan Eissing via dev:


Am 09.03.2023 um 11:22 schrieb Rainer Jung <rainer.j...@kippdata.de>:

Puzzle partially solved: once I add "--header 'content-type: 
application/x-www-form-urlencoded'" to the nghttp call, the problem seems fixed - 
with and without deflate. No more hang, no more status 500, no double requests. I still 
don't know, which side is influenced, nghttp or http, so I am still not sure, whether the 
odd behavior without the header is a bug.

Hmm, never seen that. Is this a current nghttp? Normally, calling "nghttp 
--data=file" will do all that.

I think, since it stabilizes the test, please add the forced content-type 
header to the test suite. It should do no harm (famous last words),

Will do. It happens with nghttp 1.34.0 and recent 1.52.0. I took the header from my curl, which automatically adds it, but I think the right header is

Content-Type: multipart/form-data; boundary=DSAJKcd9876

That one is explicitly added in pyhttpd/nghttp.py in function upload_file, but not in post_name.

Skimming through the code for nghttp, it seems it dows add content-length (if not forbidden by a commandline flag), but I didn't find an explicit mentioning of content-type.

Best regards,

Rainer

Reply via email to