Exemple #1
0
 def __str__(self):
     if self.body is None:
         self.add_header("Content-Type", "null")
         self.add_header("Content-Length", 0)
     else:
         self.add_header("Content-Type", self.body.content_type)
         self.add_header("Content-Length", len(str(self.body)))
         
     return HTTPMessage.__str__(self)
Exemple #2
0
 def __str__(self):
     return HTTPMessage.__str__(self) + "\x00"