[cs631apue] Question about the Test shell For Final Project

Jan Schaumann jschauma at stevens.edu
Mon Nov 28 10:44:32 EST 2016


bzhang41 <bzhang41 at stevens.edu> wrote:
 
> when I try it on the linux lab for fetching various kind of files, like 
> `
> \dir`, `\dir\` and `\file2`, a lot of the output is "NOT FOUND".
> Is this a correct behavior ?

I do not see any requests containing backslashes in the test script.
I'm guessing you meant "/dir" etc.

Regardless, for every request issued, the result depends on where you
serve your content from.  If the directory you use as the document root
containst those entries, then it should return them; if the directory
does not contain them, then it should yield a 404, and so on.

> And I also found that one test case is
> GET /file%%20space%%3C... HTTP/1.0,
> Do we need to first parse and eliminate the parameters in the url and 
> then get the "real"
> request path ?

As per section 5.1.2 of RFC1945, the request URI may contain escaped
characters as further described in RFC1738, and the "origin server must
decode the Request-URI in order to properly interpret the request."

-Jan


More information about the cs631apue mailing list