in reply to Re^2: sending a large file via http
in thread sending a large file via http
So does this mean that the content-length header value is no longer used?I can't tell from the LWP docs if it handles that for you, but you can still set it yourself, for example with my $length = -s $filename; and then adding the appropriate header.
Regarding your code, I read the docs slightly differently:
That is, you pass the callback to the LWP->request method, not the HTTP::Request constructor.my $request = HTTP::Request->new('POST', $url, $headers); $request->protocol('HTTP/1.1'); my $browser = LWP::UserAgent->new(); my $response = $browser->request($request, \&sendthis);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: sending a large file via http
by mifflin (Curate) on Jun 18, 2007 at 23:42 UTC | |
|
Re^4: sending a large file via http
by tty04 (Initiate) on Nov 09, 2007 at 23:28 UTC |