mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #643 from wooparadog/fix-error-msg
Error message should be able to be encoded in latin1
This commit is contained in:
commit
7d44b4410c
@ -38,7 +38,7 @@ class InvalidHTTPVersion(ParseException):
|
|||||||
self.version = version
|
self.version = version
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Invalid HTTP Version: %s" % self.version
|
return "Invalid HTTP Version: %r" % self.version
|
||||||
|
|
||||||
|
|
||||||
class InvalidHeader(ParseException):
|
class InvalidHeader(ParseException):
|
||||||
@ -47,7 +47,7 @@ class InvalidHeader(ParseException):
|
|||||||
self.req = req
|
self.req = req
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Invalid HTTP Header: %s" % self.hdr
|
return "Invalid HTTP Header: %r" % self.hdr
|
||||||
|
|
||||||
|
|
||||||
class InvalidHeaderName(ParseException):
|
class InvalidHeaderName(ParseException):
|
||||||
@ -55,7 +55,7 @@ class InvalidHeaderName(ParseException):
|
|||||||
self.hdr = hdr
|
self.hdr = hdr
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Invalid HTTP header name: %s" % self.hdr
|
return "Invalid HTTP header name: %r" % self.hdr
|
||||||
|
|
||||||
|
|
||||||
class InvalidChunkSize(IOError):
|
class InvalidChunkSize(IOError):
|
||||||
@ -97,7 +97,7 @@ class InvalidProxyLine(ParseException):
|
|||||||
self.code = 400
|
self.code = 400
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Invalid PROXY line: %s" % self.line
|
return "Invalid PROXY line: %r" % self.line
|
||||||
|
|
||||||
|
|
||||||
class ForbiddenProxyRequest(ParseException):
|
class ForbiddenProxyRequest(ParseException):
|
||||||
@ -106,4 +106,4 @@ class ForbiddenProxyRequest(ParseException):
|
|||||||
self.code = 403
|
self.code = 403
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Proxy request from %s not allowed" % self.host
|
return "Proxy request from %r not allowed" % self.host
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user