Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

support lowercase user agent  #517

Copy link
Copy link

Description

@YegorZdanovich
Issue body actions

Hi,
I have table with unique user agents. I store them as lowercased values. I wanted to do some analyses based on my data, but figure out that gem doesn't detected browser correct.

Browser.new("mozilla/5.0 (windows nt 10.0; win64; x64; rv:52.0) gecko/20100101 firefox/52.0").name
 => "Generic Browser"

then i checked logic detection and found that in most matchers strings are compared case sensitive https://github.com/fnando/browser/blob/main/lib/browser/firefox.rb#L18

So, when i changed one symbol it works as expected.

Browser.new("mozilla/5.0 (windows nt 10.0; win64; x64; rv:52.0) gecko/20100101 Firefox/52.0").name
 => "Firefox"

So, is it possible to add lowercase string support? Basically, if you compare strings above - it's same browser, but we have different results.

Software:

  • Rails Version: "6.0.3.2"

  • Browser gem version: "2.5.1"

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.