in reply to Re^3: www::mechanize behind proxy and https not working
in thread www::mechanize behind proxy and https not working

It returns Error GETing https://www.example.com:Bad Request at scrape.pl line 18

Replies are listed 'Best First'.
Re^5: www::mechanize behind proxy and https not working
by Anonymous Monk on Sep 15, 2010 at 06:50 UTC
    What does it return when you add the following?
    $mechanize->add_handler("request_send", sub { shift->dump; return }); $mechanize->add_handler("response_done", sub { shift->dump; return });
      I get a lot of output that looks like this
      GET http://www.example.com/ Accept-Encoding: gzip User-Agent: WWW-Mechanize/1.60 Cookie: customer_type=IndividualUser; landing_page=original Cookie2: $Version="1" (no content) HTTP/1.1 302 Moved Temporarily Cache-Control: no-cache Connection: close Date: Wed, 15 Sep 2010 07:22:30 GMT .... (no content) HTTP/1.1 400 Bad Request Cache-Control: no-cache Connection: close Pragma: no-cache Content-Length: 2815 Content-Type: text/html; charset=utf-8 Client-Date: Wed, 15 Sep 2010 07:22:32 GMT Client-Peer: 159.156.152.18:8080 Client-Response-Num: 1 Proxy-Connection: close <style type="text/css"> (+ 2303 more bytes not shown) Error GETing https://www.example.com/dashboard: Bad Request at SiteScr +aper.pl li ne 22
        It looks like a problem at their end, not yours (assuming ... is innocuous)