httpserver: Use appropriate HTTP status code for unsupported methods.

This commit is contained in:
Valentin Lorentz 2016-01-05 18:01:39 +01:00
parent f773f9089b
commit 058e4100f2

View File

@ -306,7 +306,7 @@ class SupyHTTPServerCallback(log.Firewalled):
self.wfile.write(s)
def doGet(self, handler, path, *args, **kwargs):
handler.send_response(400)
handler.send_response(405)
self.send_header('Content-Type', 'text/plain; charset=utf-8; charset=utf-8')
self.send_header('Content-Length', len(self.defaultResponse))
self.end_headers()