Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Curl hangs on 204: No-Content with Transfer-Encoding: chunked #3968
I did this
from http.server import HTTPServer, BaseHTTPRequestHandler class HTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(204) self.send_header('Connection', 'keep-alive') self.send_header('Transfer-Encoding', 'chunked') # self.send_header('Content-Length', '0') self.end_headers() httpd = HTTPServer(('localhost', 8080), HTTPRequestHandler) httpd.serve_forever()
I expected the following
Expected curl to terminate, instead hangs permanently or until exited.
Similar issue described in https://serverfault.com/q/870072 from 2017, although doesn't appear to have been reported.
As an important note testing with #3702 the above works as expected. Since the mentioned PR appears to be fixing a different issue I think it's still important to mention here, but please let me know if this should be closed in favor of #3702.