websrv_lib: Log junk http requests

If a request doesn't start with a valid HTTP request line, log that
whole line.

For some strange reason, kernel 2.6.35-rc3+ triggered xml request lines
to appear.

bzr revid: p_christ@hol.gr-20100726093336-962hxsxoij0pn2ba
This commit is contained in:
P. Christeas
2010-07-26 12:33:36 +03:00
parent 4c6baedf13
commit 018b13240b
+1
View File
@@ -323,6 +323,7 @@ class MultiHTTPHandler(FixSendError, HttpOptions, BaseHTTPRequestHandler):
[command, path] = words
self.close_connection = 1
if command != 'GET':
self.log_error("Junk http request: %s", self.raw_requestline)
self.send_error(400,
"Bad HTTP/0.9 request type (%r)" % command)
return False