Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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
Replies are listed 'Best First'.
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 pondering the Monastery: (12)
As of 2015-07-31 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls