From: Anders N. <an...@di...> - 2001-01-29 16:19:20
|
Brent Welch: > You should print out the $env(CONTENT_TYPE) > in your CGI - perhaps TclHttpd isn't passing through the right thing. I wrote a little snippet: puts "Content-Type: text/html" fconfigure stdin -translation {binary binary} set sinput [read stdin $env(CONTENT_LENGTH)] puts -nonewline $sinput If I run that cgi-program and uploads a, say a GIF-file, and compares the output with when I upload the same file with the tclhttpd example testupload.tml, I don't get exactly the same result... The differences in the result is visible below: My cgi-test from above: GIF89a ?yu?U?,3??aC$c!????????Z?????????~}|vutrqonkjih<kaschnip> The output from testupload.tml: GIF89a ?yu?U?,3??aC$c!?s~--"'?Z?OS^?."f,~}|vutrqonkjih<kaschnip> As we see, my version has some trouble with certain characters, why I ask you. How shall I configure my cgi-script to read those characters correctly? /Anders N |