You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Larry W Burton <lw...@ncat.edu> on 2010/12/17 22:45:39 UTC

[users@httpd] mod_proxy_html how to stop code fixing

I have configured Apache Apache/2.2.3 on CentOS 5.5 as a reverse proxy
using mod_proxy_html, and both Apache and mod_proxy_html are working
correctly. The problem is that I am trying to access a Promise storage
Array which has horrible html. Specifically, MULTIPLE </html> tags in the
same page:
... the first half of the page ...
</script>

</body>
</html>

<html>
<head>
<title>Promise WebPAM PROe</title>
... the remaining part of the page.
If I enable page re-writing with SetOutputFilter proxy-html, then
mod_proxy_html stops re-writing when it encounters the first </html> tag.
If I do not enable re-writing, the first page is displayed on the Firefox
client, but subsequent links are in the form http://192.168.x.x/whatever
instead of URL/alias/whatever.
Is there a way to stop mod_proxy_html from trying to fix the html while
still re-writing the URLs?


Dr. Larry Burton
Associate Professor
Department of Electronics, Computers, and Information Technology
School of Technology
North Carolina Agricultural and Technical State University


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy_html how to stop code fixing

Posted by Larry W Burton <lw...@ncat.edu>.
Thank you, Nick, for your rapid and obviously knowledgeable advice. I will try the solutions you suggest and report back to the group with results in case someone else is having a similar problem.

Larry
Dr. Larry Burton
Associate Professor
Department of Electronics, Computers, and Information Technology
School of Technology
North Carolina Agricultural and Technical State University


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy_html how to stop code fixing

Posted by Nick Kew <ni...@webthing.com>.
On 17 Dec 2010, at 21:45, Larry W Burton wrote:

> 
> I have configured Apache Apache/2.2.3 on CentOS 5.5 as a reverse proxy
> using mod_proxy_html, and both Apache and mod_proxy_html are working
> correctly. The problem is that I am trying to access a Promise storage
> Array which has horrible html. Specifically, MULTIPLE </html> tags in the
> same page:

I've seen this problem before.  The basic problem is obviously your backend's
non-HTML.  It's not actually mod_proxy_html fixing it, but the underlying parser
(libxml2).

I've some recollection of working around this for a client, but that was some years
ago and I couldn't tell you how - unless perhaps you can trick the parser using
mod_xml2enc's xml2StartParse to squish the first <html> (I'd have to try it to see
how the parser responds to that).  But that's an outside chance: otherwise you're
probably better off with a plain text search-and-replace like mod_sed,
mod_substitute or mod_line_edit.

-- 
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org