404 Not Found scenario fails CRLF

I’m stuck on Stage #ap6.

I’ve included \r\n\r\n in the 404 not found.

Here are my logs:

[tester::#AP6] Failed to read response: 
[tester::#AP6] Received: "TP/1.1 404 Not Found"
[tester::#AP6]                                ^ error
[tester::#AP6] Error: Expected CRLF after status line

And here’s a snippet of my code:

What I am returning in code is:

const HTTP_404: &str = "HTTP/1.1 404 Not Found\r\n\r\n";

I suspect the test runner trims the whitespace at the end of the string but still checks for CRLF.

Hey @ola-dotun, I added a log before if response.is_empty() and confirmed that the response isn’t actually empty.

The issue is caused by handle_file_path returning HTTP_404.to_string(), which then gets trimmed:

BTW, HTTP_404 doesn’t look correct either:

Thanks @andy1li for helping me figure it out. I’m unblocked now.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.