# HG changeset patch # User Mads Kiilerich # Date 1358279697 -3600 # Node ID b9f44c378e62d329613391f70dbf5e265dd94ce8 # Parent ed05e4372751761319cb18f5c6dd201c8964e31d serve: don't send any content headers with 304 responses Fixes HTTP protocol violation introduced in cf5c76017e11. 'hg serve' would show a stacktrace when loading pages that not had been modified. There was test coverage for this, but the wrong response headers wasn't shown and thus not detected. [ original upstream message ] diff -r ed05e4372751 -r b9f44c378e62 tests/get-with-headers.py --- a/tests/get-with-headers.py Wed Jan 16 00:09:26 2013 +0100 +++ b/tests/get-with-headers.py Tue Jan 15 20:54:57 2013 +0100 @@ -31,6 +31,8 @@ conn.request("GET", '/' + path, None, headers) response = conn.getresponse() print response.status, reasons.get(response.reason, response.reason) + if show[:1] == ['-']: + show = [h for h, v in response.getheaders() if h.lower() not in show] for h in [h.lower() for h in show]: if response.getheader(h, None) is not None: print "%s: %s" % (h, response.getheader(h))