tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Finding the context of a Request at the point of parsing session
Date Sun, 29 Aug 2010 23:46:13 GMT
2010/8/30 Wesley Acheson <wesley.acheson@gmail.com>:
> Hi
>
> In tomcat 6 trunk
>
> At the point o.a.c.c.CoyoteAdapter#parseSessionId(org.apache.coyote.Request,
> org.apache.catalina.connector.Request) gets called the context isn't
> set in the o.a.c.c.Request parameter.  This is set later in
> #postParseRequest.
>
> Is there any way that isn't too heavy to find the context earlier.
>
> #postParseRequest does the following
>
> connector.getMapper().map(serverName, decodedURI,
>                                  request.getMappingData());
> Which maps the value.
>
> I've tried connector.getMapper() but couldn't find a .getContext()
> value on this object.
>
> Would it be okay to move up the mapper line before parseSessionId ?
>

Note, that there is semicolon (';') processing both in
parseSessionId() and in "// URI decoding" part of postParseRequest().
You have to take care of that before invoking the mapper.

If I am reading the code correctly,  parseSessionId() call modifies
the req.requestURI() bytechunk if a semicolon was there.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message