From: Anders N. <an...@di...> - 2001-01-30 10:38:22
|
Brent Welch: > Which one is correct? The correct one is the output from 'testupload.tml': GIF89a ?yu?U?,3??aC$c!?s~--"'?Z?OS^?."f,~}|vutrqonkjih<kaschnip> The incorrect one is the output from my cgi-script: GIF89a ?yu?U?,3??aC$c!????????Z?????????~}|vutrqonkjih<kaschnip> As you see, in the output from my cgi-script, 'something' has problem readin/translating some of the input and exchanges those characters with '?'. > Make sure your stdin is in binary mode: > fconfigure stdin -trans binary > in your CGI version. How does that differ from what I'm doing? fconfigure stdin -translation {binary binary} Anyway, the result is exactly the same. My cgi-code: > > puts "Content-Type: text/html" > > fconfigure stdin -translation binary > > set sinput [read stdin $env(CONTENT_LENGTH)] > > puts -nonewline $sinput > By the way, I've started work on a file upload domain > handler for TclHttpd, but it'll probably take me a > few days to get through it. If it helps my problem, I'll gladly wait. :o) Thanks for helping! /Anders N |