1. 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".

Please help, thanks!

new topic     » topic index » view message » categorize

2. Re: 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".

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

Tommy Carlier
tommy online: http://users.pandora.be/tommycarlier

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

Search



Quick Links

User menu

Not signed in.

Misc Menu