You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Layman <ra...@aswethink.com> on 2002/03/01 13:04:32 UTC

RE: [Dim Question] Redirecting GET http://blah.com/ resource -> G ET /resource - Tomcat 4

	The HTTP Protocol says requests must be formatted as:
GET /resource....

and you are sending:
GET http://server/....

and you want to know if these should be reformatted before they get to
Tomcat?  The should be reformatted before they are sent!  I would guess that
your proxy can't deal with HTTP requests on non-standard ports.  Probably
the only way to solve this without recoding the proxy would be to run Tomcat
on port 80 (the standard).

	However, the question remains as to why you are even trying to use a
proxy for this - Tomcat 4's filters give you a good opportunity to read and
log all parts of the request.

	Randy


> -----Original Message-----
> From: CAM [mailto:camccuk@yahoo.com]
> Sent: Friday, March 01, 2002 7:38 AM
> To: Tomcat Users List
> Subject: Re: [Dim Question] Redirecting GET http://blah.com/ 
> resource ->
> GET /resource - Tomcat 4
> 
> 
> I hate to repost but I can't get anywhere with this - the 
> Proxy-Support Howto 
> and the high level entity docs don't seem to be relevant (on 
> an associated 
> point, does anyone know of a searchable set of the tomcat docs?).
> 
> Am I trying to rewrite this URL in the wrong place - I mean 
> should these 
> requests be getting reformatted before they even arrive at 
> Tomcat? I'm not sure 
> if it will support this form of request.
> 
> I am currently attempting to decode RFC 2068 to see if these 
> are legal requests 
> but, as I say, other servers seem happy with them...
> 
> Any clues *very* gratefully accepted...
> 
> TIA
> cam
> 
> CAM wrote:
> 
> > Hello all,
> > 
> > I'm sure I'm missing something very basic here but I can't 
> think what. 
> > I'm using a little proxy (HttpSniffer) to debug header and 
> cookie info 
> > between my browser and a remote Tomcat 4-b6. I'm getting 
> failures to 
> > requests (404's) when I go thru the proxy and I can see in 
> my access 
> > logs that this is because the requests are arriving as:
> > 
> > 192.x.x.x - - [28/Feb/2002:17:30:49 00] "GET 
> > http://my.host.com:8080/dms/servlet/dms HTTP/1.0" 404 263
> > 
> > instead of:
> > 
> > 192.x.x.x - - [28/Feb/2002:17:24:16 00] "GET 
> /dms/servlet/dms HTTP/1.1" 
> > 200 2294
> > 
> > Rather than rewrite httpsniffer, I suspect I need some form 
> of redirect 
> > - besides, the sniffer works with other sites (e.g. 
> Google). I haven't 
> > managed to dig out anything about redirection from the docs 
> - there are 
> > a lot of facets to the information. Is redirection 
> associated with the 
> > Engine? The connector?
> > 
> > So, an RTFM is probably deserved but a clue as to where would be 
> > tremendous.
> 
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: [Dim Question] Redirecting GET http://blah.com/ resource -> G ET /resource - Tomcat 4

Posted by CAM <ca...@yahoo.com>.
Thanks for the reply Randy...

Randy Layman wrote:

> 	The HTTP Protocol says requests must be formatted as:
> GET /resource....
> 
> and you are sending:
> GET http://server/....
> 
> and you want to know if these should be reformatted before they get to
> Tomcat?  The should be reformatted before they are sent!  


This is, of course, what I mean.

>I would guess that
> your proxy can't deal with HTTP requests on non-standard ports.  Probably
> the only way to solve this without recoding the proxy would be to run Tomcat
> on port 80 (the standard).


The proxy seems quite robust about this and works when connecting to other sites 
on non-standard ports. (Its Tim Meadowcroft's HttpSniffer, about 1000 lines of 
densely packed perl and has been used as the basis for a few opensource http 
diagnostic projects)

 
> 	However, the question remains as to why you are even trying to use a
> proxy for this - Tomcat 4's filters give you a good opportunity to read and
> log all parts of the request.


This is good advice and probably the best course to take... The truth is that I 
am shamelessly looking for a quick fix to help me debug a webapp which is 
incidentally hosted on ApacheJserv - I thought that a quick verification of the 
proxy on Tomcat would allow me to get started - short cuts make long delays.

Its a bit of a long story and the end of an unproductive week...

Thanks for taking the time to reply,

cam





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>