ibnesayeed/webserver-tester

Status Code should be 302 not 301

Closed this issue · 3 comments

Test Case: test_2_redirect_as_per_regexp_trailing_specific_file
Request Header:
HEAD /a2-test/coolcar.html HTTP/1.1
Host: cs531-msiddique
Connection: close

Assignment Redirect File:

Status: Incoming RE Redirect URI

302: ^(.)/coolcar.html$ $1/galaxie.html
302: ^(.
)/1.[234]/(.) $1/1.1/$2
301: ^(.
)/mercury/(.*)$ $1/ford/$2

@phonedude we need your input here. The Perl file you gave me suggested a 301 redirect here, but the assignment seems to suggest a matching RegExp for 302.

# 301, not 200
$test[7]="\
HEAD $relativeURL" . "coolcar.html HTTP/1.1
Host: $host
Connection: close

";
#
# Status: Incoming RE Redirect URI 
# 
302: ^(.*)/coolcar.html$ $1/galaxie.html 
302: ^(.*)/1.[234]/(.*) $1/1.1/$2 
301: ^(.*)/mercury/(.*)$ $1/ford/$2

Either the test case or the note in the assignment needs to be changed here. By the way, we don't seem to have any test cases for the last RegExp.

that's my fault -- it's supposed to be a 302 as per the assignment description. Sorry for the confusion.

It is now fixed and deployed.