"Tony Lewis" <[EMAIL PROTECTED]> writes:

> Hrvoje Niksic wrote:
>
>> I don't understand what you're proposing.  Reading the whole file in
>> memory is too memory-intensive for large files (one could presumably
>> POST really huge files, CD images or whatever).
>
> I was proposing that you read the file to determine the length, but
> that was on the assumption that you could read the input twice,
> which won't work with the example you proposed.

In fact, it won't work with anything except regular files and links to
them.

> Can you determine if --post-file is a regular file?

Yes.

> If so, I still think you should just read (or otherwise examine) the
> file to determine the length.

That's how --post-file works now.  The problem is that it doesn't work
for non-regular files.  My first message explains it, or at least
tries to.

> For other types of input, perhaps you want write the input to a
> temporary file.

That would work for short streaming, but would be pretty bad in the
mkisofs example.  One would expect Wget to be able to stream the data
to the server, and that's just not possible if the size needs to be
known in advance, which HTTP/1.0 requires.

Reply via email to