Bug 40952 - Error page wrongly encodes URL
Summary: Error page wrongly encodes URL
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.2-HEAD
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-12 05:33 UTC by Thijs Kinkhorst
Modified: 2007-09-12 06:30 UTC (History)
0 users



Attachments
trivial solution (596 bytes, patch)
2006-11-12 05:34 UTC, Thijs Kinkhorst
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thijs Kinkhorst 2006-11-12 05:33:46 UTC
Hi,

I've been getting a few error messages from mod_proxy as such:
---snip---
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET
http://bcm-specs.sipsolutions.net/Sending?action=edit.

Reason: DNS lookup failure for: bcm-specs.sipsolutions.net
---snip---

Now I tried clicking on that URL but that made me go to the URL
http://bcm-specs.sipsolutions.net/Sending%3faction=edit

Notice how the questionmark was URL-encoded.

Looking at the source code of the error message reveals:
<a
href="http://bcm-specs.sipsolutions.net/Sending%3faction=edit">GET&nbsp;http://bcm-specs.sipsolutions.net/Sending?action=edit</a>

The URL inside the href="..." shouldn't be URL-encoded, it should be HTML
encoded: stuff like ">" should be replaced with "&gt;" etc.
Comment 1 Thijs Kinkhorst 2006-11-12 05:34:56 UTC
Created attachment 19116 [details]
trivial solution

The solution is easy: replace the ap_escape_uri call with an ap_escape_html
call.
Comment 2 Nick Kew 2007-09-08 18:14:17 UTC
Fixed in trunk - r573939.
Comment 3 Nick Kew 2007-09-12 06:30:24 UTC
Fixed in 2.2 in r574943.