You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeff <jm...@cox.net> on 2007/09/05 23:00:28 UTC

[users@httpd] reverse proxy (mod_proxy_html?) screws up js within body tag.......

I am running apache2 as a reverse proxy with the usual modules.   I have an
problem on some pages where the js within the body tag gets misplaced when
the page is rewritten, I’m presuming during the mod_proxy_html re-write:

 

NO PROXY:

 

</head>

<form method="POST" action="../cgi-bin/cgi_main" name="frmApplicationShort"
language="JavaScript" style="text-align: center">

<body onKeyPress="SetDefaultSubmit('Add Vehicle >');" bgcolor="#4b6c8b"
onLoad="toggleCoApp();document.frmApplicationShort.elements[0].focus();">

 

PROXY:

 

</head>

<body><form method="POST" action="../cgi-bin/cgi_main"
name="frmApplicationShort" language="JavaScript" style="text-align: center">

');&quot; bgcolor=&quot;#4b6c8b&quot;
onLoad=&quot;toggleCoApp();document.frmApplicationShort.elements[0].focus();
&quot;&gt;

 

 

 

Does anyone have any idea what might cause this?  I am running ver 2.x of
mod_proxy_html.

 

Regards, Jeff

 

 


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.485 / Virus Database: 269.13.5/989 - Release Date: 9/4/2007
5:54 PM
 

Re: [users@httpd] reverse proxy (mod_proxy_html?) screws up js within body tag.......

Posted by Vincent Bray <no...@gmail.com>.
On 06/09/07, Jeff <jm...@cox.net> wrote:
> </head>
>
> <form method="POST" action="../cgi-bin/cgi_main" name="frmApplicationShort"
> language="JavaScript" style="text-align: center">
>
> <body onKeyPress="SetDefaultSubmit('Add Vehicle >');"
> bgcolor="#4b6c8b"
> onLoad="toggleCoApp();document.frmApplicationShort.elements[0].focus();">

This is invalid html (form should be in body, not between head and
body) and from what I recall, the library that proxy_html uses to
parse html (libxml2) fixes these kinds of things up.

It's also considered passé to use javascript inline. Can't you extract
it to a separate file?

mod_proxy_html is rarely necessary. Are you sure you need it, and
can't arrange your front and back end URL spaces to match?

-- 
noodl

Re: [users@httpd] reverse proxy (mod_proxy_html?) screws up js within body tag.......

Posted by Nick Kew <ni...@webthing.com>.
On Wed, 5 Sep 2007 14:00:28 -0700
"Jeff" <jm...@cox.net> wrote:

> I am running apache2 as a reverse proxy with the usual modules.   I
> have an problem on some pages where the js within the body tag gets
> misplaced when the page is rewritten, I’m presuming during the
> mod_proxy_html re-write:

It's a close cousin of the issue described in
http://bahumbug.wordpress.com/2006/10/12/mod_proxy_html-revisited/
which is where ProxyHTMLStartParse came from.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
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