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.

> It would be really nice to be able to say something like:
>
>     mkisofs blabla | wget http://burner/localburn.cgi --post-file
> /dev/stdin

Stefan Eissing wrote:

> I just checked with RFC 1945 and it explicitly says that POSTs must
> carry a valid Content-Length header.

In that case, Hrvoje will need to get creative. :-)

Can you determine if --post-file is a regular file? If so, I still think you
should just read (or otherwise examine) the file to determine the length.

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

Tony

Reply via email to