Commit Graph

14 Commits

Author SHA1 Message Date
Javi Merino
e80cfee2b0 get-with-headers: don't block indefinitely if the server had an internal error
If the server had an internal error and returned 500, there's nothing
to read, so "response.read()" blocks indefinitely.  Only output the
response if there's really a response.
2013-10-02 22:46:32 +01:00
Pierre-Yves David
b7643c351c get-with-headers: add a --headeronly switch
In some case we do not care about the actual rendering.
2013-01-16 14:26:19 +01:00
Mads Kiilerich
ab59efec7d tests: make test-hgweb.t output stable
Instability introduced in combination of 08b18bf1e0f3 and 072a5d64ecaa.
2013-01-16 02:01:11 +01:00
Mads Kiilerich
5cabd60d62 serve: don't send any content headers with 304 responses
Fixes HTTP protocol violation introduced in e4a5f5db7028. '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.
2013-01-15 20:54:57 +01:00
Mads Kiilerich
1fda0b1af1 tests: prepare get-with-headers.py for MSYS
get-with-headers.py took the http GET parameter as a command line parameter
that had to start with '/'. MSYS on windows will mangle such paths.

Instead of applying a workaround everywhere (such as an extra '/') we let
get-with-headers.py add the mandatory '/'. That is consistent with the
url path handling in the Mercurial url class.

A few tests sent 'GET ?cmd=...' which is invalid. They will now send 'GET
/?cmd=...'.

This will not enable any tests for being run on windows - only remove one
reason they were disabled.
2012-06-21 03:05:02 +02:00
Dirkjan Ochtman
5ec1a29d90 tests: fix incompatibility with python-2.4 in test-hgweb
Thanks to lcantey for catching it.
2010-09-11 10:57:35 +02:00
Dirkjan Ochtman
ea62f97a35 tests: extend get-with-headers to support cache testing 2010-09-08 15:11:35 +02:00
Nicolas Dumazet
7f1a963829 pylint, pyflakes: remove unused or duplicate imports 2010-04-14 17:58:10 +09:00
Dirkjan Ochtman
c08c589861 templater: readable dates older than 24 months revert to ISO8601 (issue1006) 2009-11-05 15:19:54 +01:00
Martin Geisler
9aedf5dabd tests: fix doc string in get-with-headers.py 2009-05-17 01:24:45 +02:00
Gilles Moris
9b7deb4420 test-hgweb-*: replace "XX years ago" by a fixed string in get-with-headers.py
Note that other sed replacement commands are also filtering get-with-headers.py,
but they seem to be more test specific, hence not handled here.
2008-12-25 17:49:08 +01:00
Patrick Mezard
4813e1621f get-with-headers: fix stream modes under Windows 2008-09-28 20:40:38 +02:00
Bryan O'Sullivan
e19dabc11f hgweb: return meaningful HTTP status codes instead of nonsense 2007-11-28 08:38:42 -08:00
Eric Hopper
6ae7c3c284 Add a test for getting raw files via the web UI. 2006-06-29 16:44:23 -07:00