You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Arieh Markel <Ar...@Central.Sun.COM> on 2000/04/26 02:22:05 UTC

Question about (apparent) change in behavior in Tomcat

After downloading the latest today (and not having downloaded a version
since about 4 weeks ago), I am experiencing some differences in
behavior.

It is not clear to me whether they are attributable to me having
'coded around' bugs that were since fixed or that new things may have
popped up.

. When instantiating my tomcat server, I am not specifying the name of
  the host, nor the interface.
  
. When invoking my initial servlet (a login servlet), it generates a
  URL based on the original host/port combination.
  
. The problem I have is that the host returned is 'localhost', even when
  the browser accessing the request is on a different machine.
  
  On the previous version (from Mar 20 approximately), the behavior was
  'correct', i.e. it returned the name of the host.
  
I am wondering whether I am doing wrong.

BTW I am using both the SimpleTcp connector and the PoolTcp connector.

--

Other changes in behavior that I see are manifested in a RequestInterceptor
that I developed.

. Before, on non servlet URLs (for example html pages, javascript, gif),
  the path to the page appeared on the PathInfo component of with the
  servlet appearing on the URI.
  
. Now, they are intercepted but they appear not to be associated with
  the servlet.



  
Arieh
--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Re: Question about (apparent) change in behavior in Tomcat

Posted by Costin Manolache <co...@costin.dnt.ro>.
> . The problem I have is that the host returned is 'localhost', even when
>   the browser accessing the request is on a different machine.
>
>   On the previous version (from Mar 20 approximately), the behavior was
>   'correct', i.e. it returned the name of the host.

I think I fixed that today - it was result of reusing the Request instance,
and a bug in recycle()/HttpRequest.

Please check - and let me know if it's still broken.


> . Before, on non servlet URLs (for example html pages, javascript, gif),
>   the path to the page appeared on the PathInfo component of with the
>   servlet appearing on the URI.
>
> . Now, they are intercepted but they appear not to be associated with
>   the servlet.

Are you using a mapping or the default servlet ?

Either way, the SimpleMapper is the component that does all the mapping,
and it has a lot of "legacy" code in it. I started with a new mapper,
SimpleMapper1 - it's a rewrite that also supports virtual hosts and
few optimizations ( even more on the way :-).

What's missing is the access control ( that is better done in the
mapper, to avoid double parsing and double pattern matching). I'm
looking for an elegant way to do that, instead of hacking something
in - give me few more days if possible, or I can just try to fix
the original mapper as a workaround.

Costin