Beispiel #1
0
 def __str__(self):
     headers = (k + ': ' + str(v) for k, v in self.headers.items())
     txt = "%s\n\t{%s}" % (self.requestline, ', '.join(headers))
     if hasattr(self, 'body') and self.body:
         plain = decompress(self.body, self.content_encoding)
         txt += "\n" + str_(plain)
     return txt
Beispiel #2
0
	def __str__(self):
		headers = ( k + ': ' + str(v) for k, v in self.headers.items() )
		txt = "%s %s %s\n\t{%s}" % (self.command, self.path, self.request_version, ', '.join(headers))
		if self.body:
			plain = decompress(self.body, self.content_encoding)
			txt += "\n" + str_(plain)
		return txt
Beispiel #3
0
	def __str__(self):
		headers = ( k + ': ' + str(v) for k, v in self.headers.items() )
		txt = "%s\n\t{%s}" % (self.requestline, ', '.join(headers))
		if hasattr(self, 'body') and self.body:
			plain = decompress(self.body, self.content_encoding)
			txt += "\n" + str_(plain)
		return txt
Beispiel #4
0
def body_text(req):
	return decompress(req.body, req.content_encoding)
Beispiel #5
0
def body_text(req):
    return decompress(req.body, req.content_encoding)