You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Anand Kumria <wi...@progsoc.uts.edu.au> on 1997/11/22 11:30:26 UTC

protocol/1454: Apache doesn't always understand requests with the absoluteURI in them

>Number:         1454
>Category:       protocol
>Synopsis:       Apache doesn't always understand requests with the absoluteURI in them
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sat Nov 22 02:40:00 PST 1997
>Last-Modified:
>Originator:     wildfire@progsoc.uts.edu.au
>Organization:
apache
>Release:        1.2.4
>Environment:
tested on multiple - SunOS4.1.4U1/ GCC 2.7.2.1, Debian Linux 1.3.1
>Description:
According to RFC2068 section 5.1.2 the Request-URI is:

	Request-URI    = "*" | absoluteURI | abs_path

It goes to on to say further that:

	"To allow for transition to absoluteURIs in all requests in future
   versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI
   form in requests, even though HTTP/1.1 clients will only generate
   them in requests to proxies."

Under Apache 1.2.4 this only works if you provide a Host: header.
>How-To-Repeat:
Section 5.1.2 has the following example request line.

	GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1

This results in:

---

akumria@caliban [~] 316 $telnet www.w3.org http
Trying 18.23.0.22...
Connected to www.w3.org.
Escape character is '^]'.
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Sat, 22 Nov 1997 10:26:04 GMT
Server: Apache/1.2.4
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html119
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that
this server could not understand.<P>
<P>Additionally, a 400 Bad Request
error was encountered while trying to use an ErrorDocument to handle the request.
</BODY></HTML>

0

---

However it should have worked. The following does:

---

akumria@caliban [~] 317 $telnet www.w3.org http
Trying 18.23.0.23...
Connected to www.w3.org.
Escape character is '^]'.
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
Host: www.w3.org

HTTP/1.1 301 Moved Permanently
Date: Sat, 22 Nov 1997 10:27:54 GMT
Server: Apache/1.2.4
Location: http://www.w3.org/TheProject.html
Transfer-Encoding: chunked
Content-Type: text/html

ba 
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved <A HREF="http://www.w3.org/TheProject.html">here</A>.<P>
</BODY></HTML>

0

^]

telnet> quit
Connection closed.

---

The Host: header isn't required.


>Fix:

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]