Skip to content

Commit

Permalink
Restored "Mac FireFox" user-agent alias
Browse files Browse the repository at this point in the history
This maintains backwards-compatibility with earlier releases of
mechanize 2.  sparklemotion#231
  • Loading branch information
drbrain committed May 21, 2012
1 parent 278898c commit 1f1fce5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rdoc
Expand Up @@ -3,6 +3,9 @@
=== 2.5.2

* Bug fix
* Fixed casing of the Mac Firefox user-agent alias to match Linux Firefox.
In mechanize 3 the old "Mac FireFox" user-agent alias will be removed.
Pull request #231 by Gavin Miller.
* Mechanize now authenticates using the raw challenge, not a reconstructed
one, to avoid dealing with quoting rules of RFC 2617. Fixes failures in
#231 due to net-http-digest_auth 1.2.1
Expand Down
2 changes: 2 additions & 0 deletions lib/mechanize.rb
Expand Up @@ -129,6 +129,8 @@ class Error < RuntimeError
'iPhone' => 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3',
}

AGENT_ALIASES['Mac FireFox'] = AGENT_ALIASES['Mac Firefox']

def self.inherited(child) # :nodoc:
child.html_parser ||= html_parser
child.log ||= log
Expand Down

0 comments on commit 1f1fce5

Please sign in to comment.