Exemple #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
Exemple #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
Exemple #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
Exemple #4
0
def body_text(req):
	return decompress(req.body, req.content_encoding)
Exemple #5
0
def body_text(req):
    return decompress(req.body, req.content_encoding)