~ubuntu-branches/debian/squeeze/erlang/squeeze

« 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-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

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),