Hmm, I downloaded 5.5.12 and tried the agent-header specific code with it:

        public void processLogin(User user, HttpServletRequest req,
HttpServletResponse res) {
                StringBuffer info = new StringBuffer();
                info.append("login ");
                info.append(user.getUserName());
                info.append(" [");
                info.append(user.getUserId().getPlainPresentation());
                info.append("] ");
                info.append(user.getEmail());
                info.append(" ");
                info.append(UserHelper.getGenderDescription(user.getGender()));
                info.append(" ");
                
info.append(UserHelper.getStatusDescription(user.getMembershipStatus()));
                info.append(" ");
                info.append(req.getRemoteAddr());
                info.append(" / ");
                info.append(req.getRemoteHost());
                info.append(" Agent: ");
                info.append(req.getHeader("user-agent"));
                log.info(info);         
        }

outcome was:

2005-10-08 15:36:50,453 INFO  - login leon [6] [EMAIL PROTECTED] male premium
127.0.0.1 / 127.0.0.1 Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.7) Gecko/20040626 Firefox/0.8

which I think was same behaviour as before.

I took tomcat out of the box (5.5.12 tar.gz) and only changed the http port.

regards
leon


On 10/8/05, Richard Mixon <[EMAIL PROTECTED]> wrote:
> I am just using the standard HTTP connector. This is on my development
> workstation so I don't normally run JK and Apache, except for final testing.
>
> On the developer list I did see one mention of user-agent header, but on
> closer inspection it appeared to be for a completely different issue.
>
> Thanks - Richard
>
> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
> Sent: Friday, October 07, 2005 10:13 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Tomcat 5.5.12 and user-agent header
>
>
> "Richard Mixon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >I tested out my application on 5.5.12 yesterday and noticed one small
> >anomally. I had a JSP in my sitemesh decorator "default.jsp" that ends
> >up  wrapping the login page for container managed authentication. This
> >page  had  a statement
> >    String  _userAgent = request.getHeader("user-agent").toLowerCase();
> >
> > It gets a null-pointer exception in 5.5.12, but under 5.5.9 it runs fine.
> > In
> > 5.5.12, after the login succeeds then the user-agent headers appear to
> > be there just fine, but not on the initial login page.
> >
> > Is this a known issue?
> >
>
> It's certainly not a known issue.  It would help a lot if you could tell us
> which Connector you are using at the time (e.g. HTTP/1.1, HTTP/1.1-APR,
> AJP/1.3, AJP/1.3-APR).
>
> > Thank you - Richard
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to