Harald Joerg <[EMAIL PROTECTED]> writes: > As a fallback, HTTP::Response::parse could set the protocol to undef > if it turns out to be a three-digit number, assigning this value to > the code (after assigning to the message what was parsed as the code).
This is my preferred fix. Just make HTTP::Response::parse deal with what as_string spits out. I would just make it look at the string before spliting it. If it starts with /\d/ split in 2 instead of 3. > > Maybe the best fallback would be to write some "undefined" value in > HTTP::Response::as_string if the protocol is undefined: > > my $status_line = "$code"; > my $proto = $self->protocol; > - $status_line = "$proto $status_line" if $proto; > + $status_line = $proto ? "$proto $status_line" > + : "UNKNOWN $status_line"; > > But again, this might break existing code. I also find this quite ugly. > I could submit patches for all the fallbacks and workarounds - That would be very much appreciated. Regards, Gisle