On Mon, Jul 27, 2009 at 7:48 AM, John P. Speno<[email protected]> wrote:
> Then ran the server using manage.py runserver.
>
> telnet localhost 8000
>
> typed and entered: GET foo HTTP/1.0
>
> And the exception is raised. Trying to GET any resource that doesn't
> begin with a slash raises this exception.

Unless I'm reading the RFC incorrectly, that's an invalid HTTP request.
I don't know that Django needs to support invalid HTTP.

For the interested, I'll show my work. The syntax of the beginning of an
HTTP request [1] is::

    Request-Line   = Method SP Request-URI SP HTTP-Version CRLF
    Request-URI    = "*" | absoluteURI | abs_path | authority

Only the `abs_path` part is important here [2]; RFC 2396 [3] defines
abs_path as::

    abs_path      = "/"  path_segments

Jacob

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1
[2] "*" is only supported by `OPTIONS`; absoluteURL and authority by
proxies.
[3] http://www.ietf.org/rfc/rfc2396.txt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to