ibnesayeed/webserver-tester

test_2_redirect_to_trailing_slash_for_directory_path Test Case

Closed this issue · 1 comments

Line number of code from Tester.py file: 411
assert loc.endswith("/a2-test/2/"), f"Location expected to end with /a2-test/1/, returned {loc}"
Is the path in error string correct or the assert test case string?

My test case fails with below request and response header:

ASSERTION: Location expected to end with /a2-test/1/, returned /a2-test/1/

Original Request
GET /a2-test/1 HTTP/1.1
Host: cs531-msiddique
Connection: close

Original Response (Payload: 209 bytes, Connection: closed)
HTTP/1.1 301 Moved Permanently
Date: Wed, 24 Oct 2018 04:07:59 GMT
Server: Assignment1/Version/0.1
Content-Length: 209
Content-Type: text/html
Location: /a2-test/1/
Connection: close

It was a typo on my end which is fixed now. Thanks for reporting.