Show More
@@ -153,7 +153,8 b' class _httprequesthandler(BaseHTTPServer' | |||
|
153 | 153 | self.send_header(*h) |
|
154 | 154 | if h[0].lower() == 'content-length': |
|
155 | 155 | self.length = int(h[1]) |
|
156 |
if self.length is None |
|
|
156 | if (self.length is None and | |
|
157 | saved_status[0] != common.HTTP_NOT_MODIFIED): | |
|
157 | 158 | self._chunked = (not self.close_connection and |
|
158 | 159 | self.request_version == "HTTP/1.1") |
|
159 | 160 | if self._chunked: |
@@ -31,6 +31,8 b' def request(host, path, show):' | |||
|
31 | 31 | conn.request("GET", '/' + path, None, headers) |
|
32 | 32 | response = conn.getresponse() |
|
33 | 33 | print response.status, reasons.get(response.reason, response.reason) |
|
34 | if show[:1] == ['-']: | |
|
35 | show = [h for h, v in response.getheaders() if h.lower() not in show] | |
|
34 | 36 | for h in [h.lower() for h in show]: |
|
35 | 37 | if response.getheader(h, None) is not None: |
|
36 | 38 | print "%s: %s" % (h, response.getheader(h)) |
@@ -310,8 +310,10 b' Test the access/error files are opened i' | |||
|
310 | 310 | |
|
311 | 311 | static file |
|
312 | 312 | |
|
313 | $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT 'static/style-gitweb.css' | |
|
313 | $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server | |
|
314 | 314 | 200 Script output follows |
|
315 | content-length: 4619 | |
|
316 | content-type: text/css | |
|
315 | 317 | |
|
316 | 318 | body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; } |
|
317 | 319 | a { color:#0000cc; } |
General Comments 0
You need to be logged in to leave comments.
Login now