cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurens Holst (JIRA)" <j...@apache.org>
Subject [jira] Created: (COCOON-1854) Browser selector should have Opera before MSIE
Date Sat, 27 May 2006 02:01:29 GMT
Browser selector should have Opera before MSIE
----------------------------------------------

         Key: COCOON-1854
         URL: http://issues.apache.org/jira/browse/COCOON-1854
     Project: Cocoon
        Type: Bug

  Components: - Components: Sitemap  
    Versions: 2.1.9    
    Reporter: Laurens Holst
    Priority: Minor


Hi,

In current versions, Opera identifies itself in the UA string as MSIE by default. Nevertheless
it can be identified because the string also contains 'Opera'.

This however only works if browser checks check for Opera *before* they check for MSIE. To
properly detect Opera the browser selector should thus be modified, from:

  <map:selectors default="browser">
    <map:selector logger="sitemap.selector.browser" name="browser" src="org.apache.cocoon.selection.BrowserSelector">
      <browser name="explorer" useragent="MSIE"/>
      <browser name="pocketexplorer" useragent="MSPIE"/>
      <browser name="handweb" useragent="HandHTTP"/>
      <browser name="avantgo" useragent="AvantGo"/>
      <browser name="imode" useragent="DoCoMo"/>
      <browser name="opera" useragent="Opera"/>
      <browser name="lynx" useragent="Lynx"/>
      <browser name="java" useragent="Java"/>
      <browser name="wap" useragent="Nokia"/>
      <browser name="wap" useragent="UP"/>
      <browser name="wap" useragent="Wapalizer"/>
      <browser name="mozilla5" useragent="Mozilla/5"/>
      <browser name="mozilla5" useragent="Netscape6/"/>
      <browser name="netscape" useragent="Mozilla"/>
    </map:selector>

into:

  <map:selectors default="browser">
    <map:selector logger="sitemap.selector.browser" name="browser" src="org.apache.cocoon.selection.BrowserSelector">
      <browser name="opera" useragent="Opera"/>
      <browser name="explorer" useragent="MSIE"/>
      <browser name="pocketexplorer" useragent="MSPIE"/>
      <browser name="handweb" useragent="HandHTTP"/>
      <browser name="avantgo" useragent="AvantGo"/>
      <browser name="imode" useragent="DoCoMo"/>
      <browser name="lynx" useragent="Lynx"/>
      <browser name="java" useragent="Java"/>
      <browser name="wap" useragent="Nokia"/>
      <browser name="wap" useragent="UP"/>
      <browser name="wap" useragent="Wapalizer"/>
      <browser name="mozilla5" useragent="Mozilla/5"/>
      <browser name="mozilla5" useragent="Netscape6/"/>
      <browser name="netscape" useragent="Mozilla"/>
    </map:selector>

i.e. Opera is moved five notches up to be tested before MSIE is.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message