diff tests/test-archive.t @ 18968:7d2a7f8e9da4

hgweb: respond HTTP_NOT_FOUND when an archive request does not match any files
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Thu, 21 Mar 2013 23:27:37 +0100
parents 88d1b59f6906
children 055d5b3f83b1
line wrap: on
line diff
--- a/tests/test-archive.t	Thu Mar 21 22:09:15 2013 +0100
+++ b/tests/test-archive.t	Thu Mar 21 23:27:37 2013 +0100
@@ -108,10 +108,15 @@
   $ python getarchive.py "$TIP" gz foo | gunzip | tar tf - 2>/dev/null
   test-archive-2c0277f05ed4/foo
 
+test that we detect file patterns that match no files
+
+  $ python getarchive.py "$TIP" gz foobar
+  HTTP Error 404: file(s) not found: foobar
+
 test that we reject unsafe patterns
 
   $ python getarchive.py "$TIP" gz relre:baz
-  HTTP Error 403: Archive pattern not allowed: relre:baz
+  HTTP Error 404: file(s) not found: relre:baz
 
   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS