[prog] HTTP-to-HTTPS tunnel

Jacinta Richardson jarich at perltraining.com.au
Wed Jun 18 17:03:24 EST 2003


On Wed, 18 Jun 2003, Dan Richter wrote:

> Does anyone know of a simple program that provides an HTTP-to-HTTPS tunnel?
> 
> I'm writing a Perl program that grabs e-mail off of a webmail system, but 
> most webmail systems use HTTPS and Perl's LWP::UserAgent class can't handle 
> that. I've tried sending it through wget but I can't figure out a way to 
> transfer version 2 cookies. (You can't just output those to a 
> Netscape-style cookie file, can you?)

I'm not 100% sure what you mean by "Perl's LWP::UserAgent class can't
handle that".  Are you saying that LWP::UserAgent can't handle HTTPS?
Because in that case you'd be mistaken, unless you live in a part of the
world which doesn't allow you to use proper encryption.  Alternately,
perhaps it's time you updated your version of LWP?

See:
	http://search.cpan.org/dist/libwww-perl/

Check out the README.SSL with the distribution:

"The libwww-perl package has support for using SSL/TLSv1 with its HTTP
client and server classes. This support makes it possible to access
https schemed URLs with LWP. Because of the problematic status of
encryption software in general and certain encryption algorithms in
particular, in several countries, libwww-perl package doesn't include
SSL functionality out-of-the-box."

I'm not sure about wget and cookies.  I've always done this kind of cookie
handling with HTTP::Cookies.  I've only rarely used wget.

All the best,

	Jacinta



--
   ("`-''-/").___..--''"`-._          |  Jacinta Richardson	    |
    `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
    (_Y_.)'  ._   )  `._ `. ``-..-'   |      +613 9354 6001 	    |  
  _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
(il),-''  (li),'  ((!.-'              |   www.perltraining.com.au   |



More information about the Programming mailing list