Keep-Alive request hangs if made to an URL that returns 204 response
OlegTheCat opened this issue · comments
Here's a simple HTTP server in Python that returns 204 response for all requests:
#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class S(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(204)
self.end_headers()
def run(server_class=HTTPServer):
server_address = ('', 4343)
httpd = server_class(server_address, S)
httpd.serve_forever()
if __name__ == "__main__":
run()
When making a keep-alive request with drakma there the execution hangs forever. The non-keep-alive request works fine:
> (drakma:http-request
"http://localhost:4343/"
:method :GET)
#()
204
((:SERVER . "BaseHTTP/0.3 Python/2.7.15+")
(:DATE . "Thu, 25 Oct 2018 15:44:38 GMT"))
#<PURI:URI http://localhost:4343/>
#<FLEXI-STREAMS:FLEXI-IO-STREAM {1051E270A3}>
T
"No Content"
;; OK
> (drakma:http-request
"http://localhost:4343/"
:method :GET
:keep-alive t :close nil)
;; hangs forever
Just wanted to report this ;)
Seems like nobody is interested in drakma anymore.
Btw, the fix is trivial.
Seems like nobody is interested in drakma anymore.
I am. :)
If the fix is trivial why don't you send a pull request?
If the fix is trivial why don't you send a pull request?
Just sharing my first impression. OK, I'll send it soon.