[cs631apue] HTTP 0.9 requests

Tejas Nadkarni tnadkarn at stevens.edu
Sun Nov 24 18:21:34 EST 2013


To add to the confusion, different websites seem to handle this
differently. When using GET / and GET /adsjasjdka (for not found) which are
both valid HTTP 0.9 request..s

www.internet.org - responds with HTTP/1.1 headers and everything for a
HTTP/1.0 request.

www.apache.org - responds ONLY with the entity body and no headers or
response code. IF the file is not found, it just sends the HTML of the 404
page but no code

www.stevens.edu - responds only with entity body per RFC for not found
returns the 404 HTML but no headers/response code.

So what are we supposed to follow? RFC 1945 would say apache and stevens
are following HTTP 0.9 while internet.org isn't (and others I've tried).


On Sun, Nov 24, 2013 at 6:06 PM, Tejas Nadkarni <tnadkarn at stevens.edu>wrote:

> Any update on this?
>
> Should the server respond with a code or just the entity-body?
>
> i.e.
>
> GET /index.html
>
> Response: <contents of index.html>
>
> OR
>
> Response: HTTP/1.0 200 OK
> <contents of index.html>
>
> I believe the server responds with the server code but nothing else but
> want confirmation.
>
>
> On Sun, Nov 24, 2013 at 8:49 AM, Tejas Nadkarni <tnadkarn at stevens.edu>wrote:
>
>> I've been reading the RFC and I understand 0.9 are simple requests that
>> only support GET and no content-types, etc.
>>
>> However, how do you respond to HTTP 0.9 requests?
>>
>> i.e. GET /index.html is a HTTP 0.9 request
>>
>> From the RFC it seems you don't respond with headers but just the
>> response code line and that's it. If the file exists you send the file, if
>> not just the response code. Whereas with HTTP/1.0 you send the additional
>> headers.
>>
>> is this right?
>>
>> i.e. for HTTP 0.9
>>
>> Client: GET /index.html
>>
>> Server: HTTP/1.0 200 OK
>> <file contents>
>>
>> ----
>>
>> Client: GET /index.html
>>
>> Server: HTTP/1.0 404 Not Found
>>
>> Or do we still send other things like Date/Server name/etc. back?
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20131124/2a1223d9/attachment.html>


More information about the cs631apue mailing list