Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Login to Java site with WWW::Scripter charset issue

by Anonymous Monk
on Oct 03, 2012 at 02:43 UTC ( #996965=note: print w/ replies, xml ) Need Help??


in reply to Login to Java site with WWW::Scripter charset issue

http://search.cpan.org/grep?cpanid=SPROUT&release=WWW-Scripter-0.029&string=charset&i=1&n=1&C=3 and http://search.cpan.org/grep?cpanid=SPROUT&release=WWW-Scripter-0.029&string=Content.Type&i=1&n=1&C=3

suggest the problem is with the website, either the html or the javascript is setting the charset erroneously, and scripter obliges

So, since Scripter is a LWP subclass, you might see http://search.cpan.org/perldoc/LWP::UserAgent#Handlers and http://search.cpan.org/perldoc/HTTP::Config#Matching like

my $umf = URI->new( $urlLogin ); $scripter->add_handler( request_prepare => sub { my($request, $ua, $h) = @_ ->content_type_charset return; }, m_scheme => $umf->scheme, # only call this handler m_host => $umf->host, # for this host ... );


Comment on Re: Login to Java site with WWW::Scripter charset issue
Download Code
Re^2: Login to Java site with WWW::Scripter charset issue
by Anonymous Monk on Oct 03, 2012 at 09:04 UTC

    Whoops, unfinished though there :)

    my($type, $charset) = $h->content_type_charset; $h->content_type( $type ); # ditch charset

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996965]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-08-22 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (145 votes), past polls