Ticket #3619: chunked.patch

File chunked.patch, 709 bytes (added by chad@…, 18 years ago)

patch to make HttpResponse play nicer with HTTP/1.1

  • http/__init__.py

     
    164164            self._container = content
    165165            self._is_string = False
    166166        else:
    167             self._container = [content]
     167            if content != '':
     168                self._container = [content]
     169            else:
     170                # If the first string in _container is '', it screws things up
     171                # under Transfer-Encoding: chunked
     172                self._container = []
    168173            self._is_string = True
    169174        self.headers = {'Content-Type': mimetype}
    170175        self.cookies = SimpleCookie()
Back to Top