Use different http code

main
Bob Mottram 2024-07-21 14:55:30 +01:00
parent 36c96e0ec4
commit 0fdcadd825
2 changed files with 3 additions and 2 deletions

View File

@ -265,7 +265,7 @@ def daemon_http_get(self) -> None:
if contains_invalid_chars(str(self.headers)):
print('GET HTTP headers contain invalid characters ' +
str(self.headers))
http_402(self)
http_403(self)
return
if self.headers.get('Host'):

View File

@ -32,6 +32,7 @@ from httpsig import getheader_signature_input
from httpcodes import http_200
from httpcodes import http_400
from httpcodes import http_402
from httpcodes import http_403
from httpcodes import http_404
from httpcodes import http_503
from httpheaders import update_headers_catalog
@ -142,7 +143,7 @@ def daemon_http_post(self) -> None:
if contains_invalid_chars(str(self.headers)):
print('POST HTTP headers contain invalid characters ' +
str(self.headers))
http_402(self)
http_403(self)
self.server.postreq_busy = False
return