Skip to content
Snippets Groups Projects
Commit d105bbb7 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

tests: add tests demonstrating ISE for HTTP 304 responses with hgwebdir

There are two separate failures here. One for the Content-Type header.
Another for the Content-Security-Policy header.

Differential Revision: https://phab.mercurial-scm.org/D3434
parent e82b137a
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,12 @@
200 Script output follows
content-security-policy: script-src https://example.com/ 'unsafe-inline'
$ get-with-headers.py --twice --headeronly localhost:$HGPORT repo1/static/style.css content-security-policy
200 Script output follows
content-security-policy: script-src https://example.com/ 'unsafe-inline'
500 Internal Server Error
[1]
repo page should send CSP by default, include etag w/o nonce
$ get-with-headers.py --headeronly localhost:$HGPORT repo1 content-security-policy etag
......
......@@ -875,4 +875,25 @@
Internal Server Error (no-eol)
$ killdaemons.py
HTTP 304 works with hgwebdir (issue5844)
$ cat > hgweb.conf << EOF
> [paths]
> /repo = $TESTTMP/test
> EOF
$ hg serve --web-conf hgweb.conf -p $HGPORT -d --pid-file hg.pid -E error.log
$ cat hg.pid >> $DAEMON_PIDS
$ get-with-headers.py --twice --headeronly localhost:$HGPORT 'repo/static/style.css' - date etag server
200 Script output follows
content-length: 2677
content-type: text/css
500 Internal Server Error
transfer-encoding: chunked
[1]
$ killdaemons.py
$ cd ..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment