How To Close The Connection
Solution 1:
I'm not sure so take what I write with a grain of salt.
The bottle development server is a lightly modified wsgiref server which is a sligthly modified http.server server. It has no easy methods or configurations to send "unusual" headers. You can though subclass it and write some custom code. I think it should be enough to overwrite the send_head method (here) and include self.send_header("Connection", "close")
somewhere.
You can use bottly with any wsgi server you like. It has inbuild support for quite some servers, but any wsgi server should be able to serve the app. Maybe there is an easier way for other servers to send the custom header.
Also the http.server is not meant for production so you might want to change it even if you can get your header to work. If it is only for internal usage you might get away with using it.
Post a Comment for "How To Close The Connection"