Roger Wegmann <[EMAIL PROTECTED]> writes:

> I use your LWP and have found a problem. The Microsoft webserver 
> (Microsoft-IIS/5.0) returns a wrong HTTP header field: "Content Location: 
> ..." without a '-' between "Content" and '"Location". The module Net::HTTP.pm 
> returns "500 Bad header: Content Location" that is correct. But how can I 
> force the LWP to download such documents nonetheless? Do you know a good work 
> around?

The solution will depend on which version of LWP.  I'm assume 5.60 here.

Locate the method 'read_header_lines' in Net::HTTP.  This is the one
responsible for reading the headers.

Either you simply patch this method by tweaking the first regexp so
that internal space is allowed.

Or you subclass LWP::Protocol::http so that you override this method
with your own.  Look at LWP::Protocol::https.pm for how to do this.
You then tell LWP to use your modified protocol driver with a call like:

 LWP::Protocol::implementor('http', 'MyOwn::HTTP');

Regards,
Gisle

Reply via email to