[cs631apue] Http Standard

Jason Ajmo jajmo at stevens.edu
Tue Nov 14 23:28:30 EST 2017


Looking at the RFC, HTTP/1.0 requests are of the following form:

Request = Simple-Request | Full-Request
Simple-Request = "GET" SP Request-URI CRLF
Full-Request = Request-Line...
Request-Line = Method SP Request-URI SP HTTP-Version CRLF

So, that being said, your server must support:
GET URI, so GET /, GET /etc/passwd, etc. Note that this does *not* include
the version string.
OR the Full-Request, which is METHOD URI VERSION. So "GET HTTP/1.0" falls
under Simple-Request, so the server would try to serve the file/directory
"HTTP/1.0". Note that Simple-Request is technically an HTTP/0.9 request.
Ensure that the proper Simple-Response is sent when a Simple-Request is
received, as described in the RFC.

According to the RFC, we must allow HTTP/0.9 requests, as the RFC states
"If an HTTP/1.0 server receives a Simple-Request, it must respond with an
HTTP/0.9 Simple-Response." So for #3, yes, your server must properly
respond to HTTP/0.9 requests as the RFCs (up to HTTP/2.0, I believe) are
written with backwards compatibility in mind.

For #4, yes, 3 formats are defined. The RFC states "HTTP/1.0 applications
have historically allowed three different formats for the representation of
date/time stamp", which leads me to believe that any of the 3 are
acceptable for the response.

Hopefully this was all clear.

Furthermore, your questions 1-3 are clearly defined in the RFC. As
Professor Schaumann has indicated, make sure you've thoroughly read and
understand it.

Feel free to reply all with any further questions, and I'll try to respond
tomorrow.

On Tue, Nov 14, 2017 at 10:15 PM Yuan Ren <yren14 at stevens.edu> wrote:

> Hi there,
>
> Here are some questions about the final project:
>
> 1. If the client request line is "GET /", I mean no HTTP version
> specified. Should we default using HTTP/1.0 or respond to client with error
> status code? Because I noticed that the gws using the default HTTP/1.0
>
> 2. If the client request line is "GET HTTP/1.0", I mean no file or
> directory specified. Should we give the default directory or respond to
> client with error status code?
>
> 3. Should we using<major>.<minor> numbering scheme to indicate versions
> of the protocol or just implement HTTP/1.0, any other versions like
> HTTP/0.9 would get respond with NO IMPLEMENT?
>
> 4. HTTP/1.0 allowed three different formats for the representation of
> date/time stamps:
>      Sun, 06 Nov 1994 08:49:37 GMT
>      Sunday, 06-Nov-94 08:49:37 GMT
>   Sun Nov  6 08:49:37 1994
> Should we all implement?
>
> Thanks,
> Yuan
>
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>
-- 
Jason Ajmo
Stevens Institute of Technology
B.S. Cybersecurity '17
M.S. Computer Science '18
0x56FA3123
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20171115/e2ee889a/attachment.html>


More information about the cs631apue mailing list