RE: [Hampshire] Possibly daft Perl/DOS question

Top Page

Reply to this message
Author: Vic
Date:  
To: hampshire
Subject: RE: [Hampshire] Possibly daft Perl/DOS question
> That's what I'd have assumed. The script stalls waiting for an ack from
> the server - and the server believes it is 55 chars short each time.


Have you captured the traffic with ethereal? I find that makes for much
quicker problem-solving, because you can choose whether to look at client
or server first :-)

A *quick* gander at your code :-

>                 $res = $ua->request(POST "http://$target_ip/" .
> "$dest_path",
>                                 Content_Type => 'multipart/form-data',


From
http://search.cpan.org/~gaas/libwww-perl-5.805/lib/HTTP/Request/Common.pm
:

"The POST method also supports the multipart/form-data content used for
Form-based File Upload as specified in RFC 1867. You trigger this content
format by specifying a content type of 'form-data' as one of the request
headers"

The implication is thaty your Content_Type should be simply :-

    Content_Type => 'form-data'


N.B. I haven't tested that - I just read the POD :-)

Vic.