lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,

I am using a Lua 5.1. CGI script to handle HTTP POST-based file uploads under Windows/Apache. The script reads blocks of data from stdin until EOF, and strips multipart boundaries.

Since stdin is set to text mode, I am losing all carriage returns that were present in the original file before upload.

Question: Is there an easy way to change stdin to binary mode under Windows?

--Markus

PS: I briefly studied Kepler sources and _if_ I didn't overlook something, there is no provision against this problem as well.