Mercurial > public > mercurial-scm > hg-stable
diff tests/get-with-headers.py @ 17017:953faba28e91
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 21 Jun 2012 03:05:02 +0200 |
parents | bd98796c0b6f |
children | a4d7fd7ad1f7 |
line wrap: on
line diff
--- a/tests/get-with-headers.py Wed Jun 20 23:41:21 2012 +0200 +++ b/tests/get-with-headers.py Thu Jun 21 03:05:02 2012 +0200 @@ -21,14 +21,14 @@ tag = None def request(host, path, show): - + assert not path.startswith('/'), path global tag headers = {} if tag: headers['If-None-Match'] = tag conn = httplib.HTTPConnection(host) - conn.request("GET", path, None, headers) + conn.request("GET", '/' + path, None, headers) response = conn.getresponse() print response.status, reasons.get(response.reason, response.reason) for h in [h.lower() for h in show]: