On Tue, Aug 08, 2006 at 12:36:59PM +0100, Andy Armstrong wrote:
> 
> >an IIS server,
> >and I know that I need to be sending a slightly altered string in  
> >order to get it to work.
> 
> IIS isn't broken in that way. It still expects a valid HTTP request  
> with a blank line between the header and the body. Is the service  
> you're talking to a private one or is it publicly available on the  
> 'net somewhere?
> 
Its publicly available on the net - its called 'swapdrive.com' - but 
forget about my 'standards' argument for a bit - I agree its a bit
mesleading. 

My example was not meant to be taken literally, it was an example of what 
I was trying to do, ie: pass text verbatim to a website, in the chance 
that the website is expecting some unusual headers.

For example, I know that the following string works with swapdrive 
(tokens replaced by ... and split to 80 chars/line)

    GET http://www.swapdrive.com/swapdriveservices/service.asmx/Get... HTTP/1.0
    Host: www.swapdrive.com
    User-Agent: Mozilla/5.9 Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) 
                Gecko/20060728 Firefox/1.5.0.6
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;
            q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language:en-us,en;q=0.5
    Accept-Encoding; gzip,deflate
    Accept-Charset; ISO-8851-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Proxy-Connection: keep-alive

I know this because I sniffed it with ethereal. Now why should I take the extra 
step of 
cutting up this perfecly good query and try to stuff it into perl methods when 
its available for free and I could pass it verbatim to LWP?

Ed

(
    ps - On a related matter, I'm having issues with lwp, Crypt-SSLeay, and 
proxies. 
    I know this is slightly different because the negotiation of viewing secure 
    traffic, but when I use lwp-request with the following query I get errors, 
wheras
    with firefox everything works out fine:

    % lwp-request 
'https://www.swapdrive.com/swapdriveservices/service.asmx/GetUserInfo?sAuthDomain=pge.com&sAuthUserID=autoadmin&sAuthPassword=yabbadab&sUserID=enalysis&sDomain=pge.com'

<HTML><HEAD>
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
</HEAD><BODY>
<H2>The requested URL could not be retrieved</H2>
<HR>
<P>
The following error was encountered:
<BLOCKQUOTE>
The request was rejected because the port it was connecting to<br>
is not configured to receive the protocol being sent.<br>
 Please contact your network administrator.<br>
</BLOCKQUOTE>
</UL>
</P>

<br clear="all">
<hr noshade size=1>
Generated Tue, 08 Aug 2006 14:32:06 GMT by
(<a href="http://www.cisco.com/";>Application and Content Networking System 
Software 5.3.3</a>)
</BODY></HTML>


    To debug, I'd like to be able to print out the two unencrypted traffic 
streams as 
they go to proxy, and from proxy to swapdrive, and compare them line by line to 
see 
where they differ. And if they differ, change LWP's output to match that of 
firefox.

        However, when I use LWP::Debug, it doesn't seem to do this low-level 
trace 
like 'wget -d' does.  Is there a way to make LWP do this?

Also, is there a good tool that lets me do this on firefox (a plugin/etc)? I 
have tamper data,
but it doesn't seem to give this level of detail (I could be wrong, I just got 
it).

)

Reply via email to