mercurial/hgweb/request.py
branchstable
changeset 13598 e5d3c7083d91
parent 12739 8dcd3203a261
child 13600 bcc59cb3714d
equal deleted inserted replaced
13597:38c9837b1f75 13598:e5d3c7083d91
    64     def read(self, count=-1):
    64     def read(self, count=-1):
    65         return self.inp.read(count)
    65         return self.inp.read(count)
    66 
    66 
    67     def drain(self):
    67     def drain(self):
    68         '''need to read all data from request, httplib is half-duplex'''
    68         '''need to read all data from request, httplib is half-duplex'''
    69         length = int(self.env.get('CONTENT_LENGTH', 0))
    69         length = int(self.env.get('CONTENT_LENGTH', 0) or 0)
    70         for s in util.filechunkiter(self.inp, limit=length):
    70         for s in util.filechunkiter(self.inp, limit=length):
    71             pass
    71             pass
    72 
    72 
    73     def respond(self, status, type=None, filename=None, length=0):
    73     def respond(self, status, type=None, filename=None, length=0):
    74         if self._start_response is not None:
    74         if self._start_response is not None: