libwww-perl / WWW-Mechanize

Handy web browsing in a Perl object
https://metacpan.org/pod/WWW::Mechanize
Other
68 stars 53 forks source link

WM: forms() failure upon empty content-type #156

Open spazm opened 7 years ago

spazm commented 7 years ago

tim.besard@gmail.com reported on Aug 30, 2009

Certain webservers seem to report a faulty content-type (or no at all).
When fetching pages from such a server, it is impossible to extract the
forms as forms() only seems to work when the content type equals to
'text/html'.

An example of such a server is the Rapidshare webserver, which is used in
the attached example.

Some possible ways of fixing this crossed my mind:
- support for content-type modification (e.g. using
"$mech->content_type($new_ct)", followed by an "_update_page(...)")
- default an unknown content-type to 'text/html', as www::mechanize now
defaults to ''
- forms() supporting pages with an empty content type

I'm using www::mechanize version 1.58, on Perl 5.10.

Thanks in advance!

Details

Imported from Google Code issue 124 via archive

Comments

petda...@gmail.com commented on May 4, 2011 :

(No comment was entered for this change.)