This was tricky.
Apache has its own portable I/O library that apparently is just a FILE
* in Apache 1.3 but is an Apache-defined C structure in 2.2. Rivet
made some assumptions about it that it shouldn't have, like that it
could use the fileno() library call to get the UNIX file descriptor.
I've got a fix working such that "upload channel" works with Apache 2
and "upload data" which has not been working in Apache 1.3 or 2. I've
also added a new subcommand, "upload tempname", to get the name of the
temporary file that contains the uploaded file for those who want to
roll their own.
In addition to working, it is now system independent without any
special code, like it'll work on NT and stuff.
The cost is that it opens the temp file that contains the uploaded
file, rather than grabbing the file handle out of the Apache portable
runtime file structure. There appears to be no "legal" way to grab
the file descriptor out of the apr_file_t structure, so I think it's a
small cost in overhead for something that's intrinsically relatively
high overhead anyway (uploading files), and IMHO it's worth it to use
the Apache file API in a standard manner.
With your agreement I'd like to commit these changes.
By the way, the "raw_post" command doesn't seem to work.