1. Re[2]: getting binary cgi post data

>> I tried to process http file uploading, but the file saved contain no
>> byte #0D's, it seems like the standard input is treated as a text file
>> rather than binary file. How to overcome this?

>> I used the standard getc(0) until the file boundary comes, but the #0D
>> bytes disappears. I write the input to a output file opened with "wb".

T> You can not depend on #0D: certain platforms end lines in #0D, some in
T> #0A and some in both #0D and #0A.

I don't mean that. I mean, I used char = getc(0) and then puts(fn,
char) but the #0D bytes disappears from the output. So the input
(stdin) and the output (fn) is not the same, how to make them the
same? Btw i run this using winxp and apache web server.

new topic     » topic index » view message » categorize

2. Re[2]: getting binary cgi post data

>>I tried to process http file uploading, but the file saved contain no
>>byte #0D's, it seems like the standard input is treated as a text file
>>rather than binary file. How to overcome this?
>>

E>    This is currently not possible. The interpreter always opens stdin in
E> text mode, and this cannot be changed. This should be fixed in 2.5, if
E> Robert remembers, which I think he should.

>>I used the standard getc(0) until the file boundary comes, but the #0D
>>bytes disappears. I write the input to a output file opened with "wb".
>>

E>    The output method does not matter; it is the input that is the problem.

Oh, I see... Thanks for the explanation.
How about the linux version? Can euphoria receive binary stdin?
(I don't have linux installed right now so I cannot try)

How about using Windows API to get stdin? Is there such a function?
Thank you.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu