~ubuntu-branches/ubuntu/lucid/erlang/lucid-proposed

« back to all changes in this revision

Viewing changes to lib/inets/src/http_server/mod_browser.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-06-11 12:18:07 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090611121807-ks7eb4xrt7dsysgx
Tags: 1:13.b.1-dfsg-1
* New upstream release.
* Removed unnecessary dependency of erlang-os-mon on erlang-observer and
  erlang-tools and added missing dependency of erlang-nox on erlang-os-mon
  (closes: #529512).
* Removed a patch to eunit application because the bug was fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
 
98
98
getBrowser(AgentString) ->
99
99
    LAgentString = http_util:to_lower(AgentString),
100
 
    case regexp:first_match(LAgentString,"^[^ ]*") of
 
100
    case inets_regexp:first_match(LAgentString,"^[^ ]*") of
101
101
        {match,Start,Length} ->
102
102
            Browser = lists:sublist(LAgentString,Start,Length),
103
103
            case browserType(Browser) of
128
128
 
129
129
browserVersion([$/|VsnString]) ->
130
130
    case catch list_to_float(VsnString) of
131
 
        Number when float(Number) ->
 
131
        Number when is_float(Number) ->
132
132
            Number;
133
133
        _Whatever ->
134
134
            case string:span(VsnString,"1234567890.") of
163
163
controlOperativeSystem(_OpString,[]) ->
164
164
    false;
165
165
controlOperativeSystem(OpString,[Regexp|Regexps]) ->
166
 
    case regexp:match(OpString,Regexp) of
 
166
    case inets_regexp:match(OpString,Regexp) of
167
167
        {match,_,_} ->
168
168
            true;
169
169
        nomatch ->
181
181
getMozilla(_AgentString,[],Default) ->
182
182
    Default;
183
183
getMozilla(AgentString,[{Agent,AgentRegExp}|Rest],Default) ->
184
 
    case regexp:match(AgentString,AgentRegExp) of
 
184
    case inets_regexp:match(AgentString,AgentRegExp) of
185
185
        {match,_,_} ->
186
186
            {Agent,getMozVersion(AgentString,AgentRegExp)};
187
187
        nomatch ->
189
189
    end.
190
190
 
191
191
getMozVersion(AgentString, AgentRegExp) ->
192
 
    case regexp:match(AgentString,AgentRegExp++"[0-9\.\ \/]*") of
 
192
    case inets_regexp:match(AgentString,AgentRegExp++"[0-9\.\ \/]*") of
193
193
        {match,Start,Length} when length(AgentRegExp) < Length ->
194
194
            %% Ok we got the number split it out
195
195
            RealStart  = Start+length(AgentRegExp),