Re: LWP and $content

Nick.Ing-Simmons@tiuk.ti.com
Fri, 4 Aug 95 09:44:05 BST


In <9508031011.aa06422@q2.ics.uci.edu>
On Thu, 03 Aug 1995 18:10:35 +0100
Martijn Koster <m.koster@nexor.co.uk> writes:
>Guy Decoux wrote:
>
>> I just want to indicate to LWP::Request that the
>> content must be read from a particular file.
>>
>> Is this possible actually with LWP::Request, or with another module of LWP
>
>No, that's a bit tricky: the content is not actually used until the
>Protocol/whatever module. So not only would yo need to educate the
>LWP::Request about files (and don't forget Content-length), you
>also need to change all the protocols to use this new interface.
>That could be quite a big change... And you might even want a more
>generic sub or module approach, rather than restricting yourself
>to files. Anyway, that needs careful thought rather than a hack.
>
>If the size of the content is a big problem, it might at least be reduced
>by preventing the content copies in LWP::protocol::http::request()...,
>and using references instead. That can be done in addition to the current
>interface, just add a $request->contentref;
>

It will probably also interact with adding Tk::fileevent support,
sending large amounts of data is really going to need testing for 
socket being 'writable' or display will freeze when socket fills up.