mirror of https://gitlab.com/bashrc2/epicyon
Use different http code
parent
36c96e0ec4
commit
0fdcadd825
|
@ -265,7 +265,7 @@ def daemon_http_get(self) -> None:
|
||||||
if contains_invalid_chars(str(self.headers)):
|
if contains_invalid_chars(str(self.headers)):
|
||||||
print('GET HTTP headers contain invalid characters ' +
|
print('GET HTTP headers contain invalid characters ' +
|
||||||
str(self.headers))
|
str(self.headers))
|
||||||
http_402(self)
|
http_403(self)
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.headers.get('Host'):
|
if self.headers.get('Host'):
|
||||||
|
|
|
@ -32,6 +32,7 @@ from httpsig import getheader_signature_input
|
||||||
from httpcodes import http_200
|
from httpcodes import http_200
|
||||||
from httpcodes import http_400
|
from httpcodes import http_400
|
||||||
from httpcodes import http_402
|
from httpcodes import http_402
|
||||||
|
from httpcodes import http_403
|
||||||
from httpcodes import http_404
|
from httpcodes import http_404
|
||||||
from httpcodes import http_503
|
from httpcodes import http_503
|
||||||
from httpheaders import update_headers_catalog
|
from httpheaders import update_headers_catalog
|
||||||
|
@ -142,7 +143,7 @@ def daemon_http_post(self) -> None:
|
||||||
if contains_invalid_chars(str(self.headers)):
|
if contains_invalid_chars(str(self.headers)):
|
||||||
print('POST HTTP headers contain invalid characters ' +
|
print('POST HTTP headers contain invalid characters ' +
|
||||||
str(self.headers))
|
str(self.headers))
|
||||||
http_402(self)
|
http_403(self)
|
||||||
self.server.postreq_busy = False
|
self.server.postreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue