[Mechanize-users] handling protocol violations
aaron_patterson at speakeasy.net
Mon Nov 13 18:11:46 EST 2006
On Mon, Nov 13, 2006 at 10:37:16PM +0100, Eduardo Fernandez Corrales wrote:
> I have found a webserver that spits the cookie version as a float
> (1.2) instead of an integer as the protocol mandates.
> So far I have been changing line 33 in cookie.rb from
> when "version" then cookie.version = Integer(value)
> when "version" then cookie.version = Integer(value.round)
> Of course every time WWW:Mechanize gets updated, I have to do the change again.
> How should we handle this? I am sure there has to be a better way.
Mechanize should handle this malformed header without blowing up. I'll
set the version to nil when it is invalid and send a warning message to
> Thank you very much, I am really having fun using this fine piece of software.
> Eduardo Fernández Corrales || 0xEFC.com
> Mechanize-users mailing list
> Mechanize-users at rubyforge.org
More information about the Mechanize-users