"Ray, Marla S" wrote:
> 
> Please pardon what might seem like a simple question but I am very new to
> using the lwp and ssl modules and need some help.
> 
> We are trying to use Perl to do a POST to an HTTPS location.  Our post
> includes a file and optionally other form input.  I can access and
> accomplish the POST just fine with my browser.  I have some test code that
> works fine if we don't go through our proxy but if I use our proxy it
> returns an error indicating that the proxy did not like the format of the
> request.  I had someone help with sniffing packets and it looks like my code
> is only generating a POST request and that there is no CONNECT request
> first.
> 
> I have done several searches and can find what I would call bits and pieces
> of the puzzle but can't find enough to bring it all together.  Every module
> that I find that I think we need seems to refer me to anther that needs
> installed.
> 
> We are testing on NT but will be moving to HPUX for production.

This is close to a problem I've worked on for over a week.  I decided
for my purposes the LWP morass is too messed up to fix for this purpose
for now.  It really needs some serious rewriting to make it work, or at
least to make it work in a way which is reasonably understandable and
changeable by someone who wants to feel solid about the results.  I
passed some code around with Philip Stoev that ended up helping me a
lot.  His modified
code is attached.  Among other things, you need to be using Net::SSLeay,
instead of IO::Socket::SSLeay, and you need to add the get_session
function to the export list in the Net/SSLeay.pm file...I think you need
to do the latter, but you're welcome to try without.  Now that I think
about it, I didn't get around to that.  

I don't want to hurt anybody's feelings about LWP.  I know it's a big
piece of code that has gotten inputs from many people, which often
results in messes.  However, I really think it
could be refactored to be a lot better than it is, AND, I think the
first step would be a if one person like me could just spend the time to
do some initial refactoring design.  Unfortunately, I'm green in HTTP,
not the most expert in Perl, and am getting too old to stay up all night
and keep my job, so I'm not likely to get to it this week.  If I can
make some contributions or suggestions that are helpful, I will try.  I
wish the code could follow some basic OO precepts like simplicity,
cleanliness, encapsulation of obsure aspects.
However, I realize that the big problem is probably that so many people
use the thing that any changes break thousands of programs.  Perhaps we
need an HWP.  This is a pretty high profile package though, and it's
what a lot of people point to when they say how awful the Perl world can
be.  It's in the interest of Perl users to improve it.

> 
> Does anyone have experience with this kind of program?
> 
> Can anyone help me with a list of modules that I will need to install and
> with some sample code that will get the request properly formatted?
> 
> Thanks,
> Marla
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]

-- 
Xeno Campanoli (erstwhile Xeno Whitenack, and Rick Burgess)
Email:  [EMAIL PROTECTED]     (Web pages:  http://www.aa.net/~xeno)

"...That side was made for you and me..." - Woody Guthrie

pstoev1.pl

Reply via email to