Bug 45987

Summary: <Loaction> and <LocationMatch> do not support RFC-1738 specified URLs
Product: Apache httpd-2 Reporter: Chris Jones <chris.jones>
Component: DocumentationAssignee: HTTP Server Documentation List <docs>
Status: RESOLVED FIXED    
Severity: minor CC: poirier
Priority: P3 Keywords: PatchAvailable
Version: 2.2.9   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Add emphasis to the sentence limiting syntax of URLs in Location

Description Chris Jones 2008-10-10 08:55:10 UTC
Hi,

It appears that the <Loaction> and <LocationMatch> directives, do not support URLs to the standard given in the RFC-1738 document.

This may be a bug in the Apache documentation (http://httpd.apache.org/docs/2.2/mod/core.html#location) or in the handling of the actual URLs.

The directives mentioned above should support the search method (query parametrs) and they currently do not.

e.g. a <Loaction of /dir/app.jsp?param=value> would not match the actual identical URL request.

I have searched the bug database for any reports of this and have found none, yet I have searched across the internet and have seemingly found multiple references to it.
Comment 1 Dan Poirier 2008-10-10 09:09:01 UTC
The doc for Location says:

"No scheme, hostname, port, or query string may be included."

so it's behaving as documented.

Are you simply complaining that the doc uses the term "URL"
rather loosely?  How would you reword it?
Comment 2 Chris Jones 2008-10-10 09:19:12 UTC
Ahem. I see the problem now, it's a case of RTFM(Carefully).

After reading and re-reading it, I missed that concise extract, until you pointed it out to me. 

Apologies for wasting peoples time.
Comment 3 Dan Poirier 2008-10-10 09:34:17 UTC
Not necessarily a waste of time. I think there's probably room for improvement in the doc that might help other people avoid the same confusion.

Comment 4 Dan Poirier 2008-10-16 07:04:34 UTC
Looking at the doc for Location some more, I think it's just
the first paragraph that can lead to confusion, because it does
say that Location works on URLs, which isn't completely accurate.  

But if it was re-worded to be more technically correct, it would 
also be more convoluted and harder to follow.  

Unless someone can come up with a new wording that is more correct 
and still pretty straightforward in giving a brief description of 
what Location does, I don't think changing it would improve it.

I'm going to change this back to INVALID, but it can certainly
be re-opened if better wording comes along.
Comment 5 Chris Jones 2008-10-16 07:29:16 UTC
Maybe a simple case of including some <strong> tags around this section of the document "No scheme, hostname, port, or query string may be included.", would provide sufficient visual notification of what is and isn't implemented.
Comment 6 Dan Poirier 2008-10-22 11:31:18 UTC
Created attachment 22767 [details]
Add emphasis to the sentence limiting syntax of URLs in Location
Comment 7 Dan Poirier 2008-10-22 11:32:25 UTC
Here's a patch to add emphasis to that sentence.  I'm reopening the bug, at a lower priority, in case someone wants to make this change.
Comment 8 Paul J. Reder 2008-12-15 16:06:24 UTC
I've committed this patch to trunk and am closing the PR. Keep an eye to make sure it is backported.