myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Weßendorf (JIRA) <...@myfaces.apache.org>
Subject [jira] Commented: (TRINIDAD-1751) NPE if User-Agent header is missing
Date Wed, 24 Mar 2010 18:39:27 GMT

    [ https://issues.apache.org/jira/browse/TRINIDAD-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849343#action_12849343
] 

Matthias Weßendorf commented on TRINIDAD-1751:
----------------------------------------------

You can test the NULL case with curl => curl -A "" url_to_trinidad_app

By default almost all "user-agents" do submit an user-agent string, since they play nice...

> NPE if User-Agent header is missing
> -----------------------------------
>
>                 Key: TRINIDAD-1751
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1751
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.2.13-core 
>            Reporter: Harald Kuhn
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.14-core , 2.0.0.3-core
>
>         Attachments: TRINIDAD-1751.patch
>
>
> After a upgrade from trinidad 1.2.11 to Trinidad 1.2.13 I get a NullPointerException
from one of our monitoring scripts.
> Caused by: java.lang.NullPointerException
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl._populateAgentImpl(AgentFactoryImpl.java:115)
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:65)
>         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getAgent(RequestContextImpl.java:695)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.chooseRenderKit(CoreRenderKit.java:139)
>         at org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:52)
> While tracking this issue further down it showed that the monitoring script doesn't send
a User-Agent header along with the request.
> This case isn't considered any more in AgentFactoryImpl._populateAgentImpl().
> The version from Trinidad 1.2.11 used to have the following code block:
> if (userAgent == null)
> {
>    _populateUnknownAgentImpl(null, agent);
>    return;
> }
> it looks has been changed/removed in this rev:
> http://svn.apache.org/viewvc?view=revision&revision=820104

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message