Mercurial > hg
comparison tests/test-hgweb-commands.t @ 18521:0af2fe7b3274 stable
hgweb: returns 404 for unknow revision instead of 500
I noticed that access to filtered revision returned HTTP 500 code (internal
server error). Investigation shown that it was the case for unknown revision
too. That wrong and we now properly return a 404 for revision not found.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 31 Jan 2013 22:30:52 +0100 |
parents | 0c51532ec233 |
children | e8efcc8ff5c0 |
comparison
equal
deleted
inserted
replaced
18520:751135cca13c | 18521:0af2fe7b3274 |
---|---|
1390 $ QUERY_STRING='rev=babar' | 1390 $ QUERY_STRING='rev=babar' |
1391 $ python hgweb.cgi > search | 1391 $ python hgweb.cgi > search |
1392 $ grep Status search | 1392 $ grep Status search |
1393 Status: 200 Script output follows\r (esc) | 1393 Status: 200 Script output follows\r (esc) |
1394 | 1394 |
1395 proper status for filtered revision | |
1396 | |
1397 | |
1398 (missing rev) | |
1399 | |
1400 $ PATH_INFO=/rev/5; export PATH_INFO | |
1401 $ QUERY_STRING='style=raw' | |
1402 $ python hgweb.cgi #> search | |
1403 Status: 404 Not Found\r (esc) | |
1404 ETag: *\r (glob) (esc) | |
1405 Content-Type: text/plain; charset=ascii\r (esc) | |
1406 \r (esc) | |
1407 | |
1408 error: unknown revision '5' | |
1409 | |
1410 | |
1411 | |
1412 (filtered rev) | |
1413 | |
1414 $ PATH_INFO=/rev/4; export PATH_INFO | |
1415 $ QUERY_STRING='style=raw' | |
1416 $ python hgweb.cgi #> search | |
1417 Status: 404 Not Found\r (esc) | |
1418 ETag: *\r (glob) (esc) | |
1419 Content-Type: text/plain; charset=ascii\r (esc) | |
1420 \r (esc) | |
1421 | |
1422 error: unknown revision '4' | |
1423 | |
1395 $ cd .. | 1424 $ cd .. |