#18 Browser Detection BUG

cewolf-0.8
closed
TagLibrary (33)
7
2003-05-05
2003-04-29
Alexander
No

Hallo Guido!
sometime PROXI administrators make Http Header
filtering and filtern http header user-agent. Then class:
de.laures.cewolf.taglib.util.BrowserDetection
line: 40
String agent = request.getHeader(USER_AGENT_KEY);
return null !!! And method:
public static final int getBrowser(HttpServletRequest
request) throws NullPointerException!!!

Discussion

  • Guido Laures

    Guido Laures - 2003-04-29
    • labels: 440364 --> TagLibrary
    • priority: 5 --> 7
    • assigned_to: nobody --> glaures
     
  • Nobody/Anonymous

    Logged In: NO

    I personally prefer the overlib approach to the tooltips and
    would like to see this for all browsers. I believe this is
    where the browser detection is used. So maybe it could just
    be removed? Another approach would be to make it configurable.

     
  • Nobody/Anonymous

    Logged In: NO

    I have make small change in the code:
    public static final int getBrowser(HttpServletRequest request){
    String agent = request.getHeader(USER_AGENT_KEY);
    if(agent != null && agent.toLowerCase().indexOf(MSIE) < 0){
    return OTHER;
    } else {
    return IE;
    }
    }
    May be it's not excellent, but in my case only IE by client
    side will be used and it's working.

     
  • Guido Laures

    Guido Laures - 2003-05-05
    • status: open --> closed
     

Log in to post a comment.