update agent.properties file

classic Classic list List threaded Threaded
3 messages Options
Daz
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

update agent.properties file

Daz
Hi,

Could you provide an updated agent.properties file?

It looks kinda outdated.

Example: there is the new Opera that is detected as Chrome and not Opera.

I tried to manually update the agent.properties file to reflect the new Opera version but to no success. Still detected as Chrome.

Here is what I added to agent.properties file to reflect the new Opera:

#NewOpera for Windows
Mozilla/{mozillaVersion} ({osData}Windows; U; {agentOs}) AppleWebkit/{appleWebKitVersion} (appleWebKitComment) Chrome/{chromeData} Safari/{safariData} {agentName}/{agentVersion}


What did I do wrong?

From my tests (fresh install) on Windows, the new Opera user agent is:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.132 Safari/537.36 OPR/21.0.1432.57 (Edition Campaign 48)


Thanks.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3077839
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: update agent.properties file

Thierry Boileau-4
Hello Daz,

This one should work.
Mozilla/{mozillaVersion} ({osData}; {agentOs}) AppleWebKit/{appleWebKitVersion} ({appleWebKitComment}) Chrome/{chromeData} Safari/{safariData} {agentName}/{agentVersion} {facultativeData}

I've noticed two mistakes in your template:
1/ this part of the template : ({osData}Windows; U; {agentOs})
    can't match "Windows NT 6.1; WOW64"
2/ the template is case sensitive: "AppleWebKit" instead of "AppleWebkit"

>Could you provide an updated agent.properties file?
I've updated with your template, and I've added an issue for that:
https://github.com/restlet/restlet-framework-java/issues/915


Best regards,
Thierry Boileau


2014-05-08 13:40 GMT+02:00 Daz <[hidden email]>:
Hi,

Could you provide an updated agent.properties file?

It looks kinda outdated.

Example: there is the new Opera that is detected as Chrome and not Opera.

I tried to manually update the agent.properties file to reflect the new Opera version but to no success. Still detected as Chrome.

Here is what I added to agent.properties file to reflect the new Opera:

#NewOpera for Windows
Mozilla/{mozillaVersion} ({osData}Windows; U; {agentOs}) AppleWebkit/{appleWebKitVersion} (appleWebKitComment) Chrome/{chromeData} Safari/{safariData} {agentName}/{agentVersion}


What did I do wrong?

From my tests (fresh install) on Windows, the new Opera user agent is:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.132 Safari/537.36 OPR/21.0.1432.57 (Edition Campaign 48)


Thanks.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3077839

Daz
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Re: update agent.properties file

Daz
Thank you, it works with your code.

Just a note: In my opinion it is quite urgent to update the agent.properties file asap.
My android app was giving server internal error to many users and I spent quite a few time looking for where was the problem as I never got any error like that. I even sent an update to upload the stacktrace to my server so I could figure out what was causing the error.

Later on I found out that Restlet is returning null for ClientInfo#getAgentName() for users using the new IExplorer or other browsers not found in the agent.properties file.

Either make getAgentName() not return null or update the agent.properties file. Now I'm always checking whether getAgentName() is returning null or not.

Again, thank you.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3079572
Loading...