You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Pablo Florencio <pa...@gmail.com> on 2013/02/18 10:52:55 UTC

[users@httpd] mod_proxy_html not working when using carriage returns

Hello to everyone,

I´m having some troubles while trying to make mod_proxy_html working in
Apache. Here is the configuration I am using:

- mod_proxy_html  3.1.2
- Apache   2.2.3

I'm using Apache as a proxy to a external webserver (10.10.10.10), so every
request any client would make to my local server(192.168.10.10) will be
redirected through mod_proxy_html. As an example, any request to
http://192.168.10.10/example/*

Will be redirected to
https://10.10.10.10/example/*

(all IPs shown are fake).

To achieve this behavior, I used this configuration at my local webserver:
ProxyPass       /example/  https://10.10.10.10/example/
ProxyPassReverse       /example/  https://10.10.10.10/example/


The problem I see is that mod_proxy_html can't convert urls when there is a
carry return inside it. For example, here there are two <a> links:


<a target="Download1" title="Download Test1" href="
https://10.10.10.10/example/working_OK.html"</a>

<a target="Download2" title="Download Test2" href="
https://10.10.10.10/example/not_working.html"</a>


The second one has a CR right after href definition, and as a result
mod_proxy_html can't convert it. I would like to ask if someone knows a way
to let mod_proxy_html understand how to interpret that CR, or just a way to
remove that CR.


Thanks in advance.

Re: [users@httpd] mod_proxy_html not working when using carriage returns

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 21 Feb 2013 14:27:53 +0100
Krist van Besien <kr...@gmail.com> wrote:

> > The second one has a CR right after href definition, and as a result
> > mod_proxy_html can't convert it. I would like to ask if someone knows a way
> > to let mod_proxy_html understand how to interpret that CR, or just a way to
> > remove that CR.
> 
> URIs can't contain a CR.

If we take the "liberal in what you accept" principle, that comes
out as a scheme called "<newline>https".  Defining a ProxyHTML rule
to match it would call for figuring out exactly what escaping
is involved, or more simply using a regexp match.

OTOH, this kind of liberality doesn't sit easily alongside security.
Accepting <newline>https as a synonym for https could be a slippery
slope.

-- 
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy_html not working when using carriage returns

Posted by Krist van Besien <kr...@gmail.com>.
On Mon, Feb 18, 2013 at 10:52 AM, Pablo Florencio
<pa...@gmail.com> wrote:
> The problem I see is that mod_proxy_html can't convert urls when there is a
> carry return inside it. For example, here there are two <a> links:
>
>
> <a target="Download1" title="Download Test1"
> href="https://10.10.10.10/example/working_OK.html"</a>
>
> <a target="Download2" title="Download Test2" href="
> https://10.10.10.10/example/not_working.html"</a>
>
>
> The second one has a CR right after href definition, and as a result
> mod_proxy_html can't convert it. I would like to ask if someone knows a way
> to let mod_proxy_html understand how to interpret that CR, or just a way to
> remove that CR.

URIs can't contain a CR. I suggest you edite the html source so that
it looks like this:
<a target="Download2" title="Download Test2"
href="https://10.10.10.10/example/not_working.html"</a>

Krist



-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bern, Switzerland

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org