1. help cgi & linux (part 2)
- Posted by salix at freemail.hu May 18, 2001
- 409 views
Thank you very much for the previous reply, Irv! Anyway here one more strange thing. Again I am not sure whether my code is poor or there's some error in Euphoria generally. I would like to ask some guys having linux experience to test and give me feedback. I think that if I send the form data by POST method then a 0 (zero) ASCII code appears instead of one or another character. I suppose that it happens in case of very long input strings. But I am not sure. I use something similar to get "POST" form data into my Query variable. (Object temp is just a temporary variable.) while 1 do temp=gets(0) if atom(temp)=1 and temp=-1 then exit end if if temp[length(temp)]='\n' then temp=temp[1..length(temp)-1] end if Query&=temp end while Thanks for your help in advance! Regards, Salix
3. Re: help cgi & linux (part 2)
- Posted by salix at freemail.hu May 20, 2001
- 400 views
This is a multi-part message in MIME format. --------------8B6DC01320F4E81A4BF10507 Dear Irv, Please find attached an .HTM and a short .EX for thestinf the mysterious 1041th character of a POST string. Of course the "action" paramter should be changed in the HTM as well as the first line of the .EX according to your configuration. I also made some tests. My results whether POST input contains the right character (OK) or submits 0 (Err) at the 1041th place in case of following setups are following. Xitami 2.4d1 and Win95 OK MSIE 3.0 (4.70.1158) and Win95 OK Netscape Navigator 4.08 and Win95 OK Opera 5.01 and Win95 Xitami 2.3d1 and Win95 OK Netscape Navigator 4.08 and Win95 Apache/1.3.19 (Unix) and Linux Err Netscape Communicator 4.76 and Win95 Err Opera 5.0 and Win95 Err Mozilla (2001031614) and Linux I am looking forward to your results, tips, ideas...! Regards, Salix --------------8B6DC01320F4E81A4BF10507 Content-Type: application/x-unknown-content-type-EX_auto_file; name="post-test.ex" Content-Transfer-Encoding: base64
4. Re: help cgi & linux (part 2)
- Posted by Irv Mullins <irvm at ellijay.com> May 20, 2001
- 407 views
BuLiba ----- Original Message ----- From: salix at freemail.hu Subject: Re: help cgi & linux (part 2) >Please find attached an .HTM and a short .EX for thestinf the mysterious >1041th character of a POST string. Of course the "action" paramter >should be changed in the HTM as well as the first line of the .EX >according to your configuration. Success. The problem is, I think, a bug in Euphoria, or perhaps in ncurses, which Euphoria uses for input/output. I wrote a perl program which reads the entire thing without problem, so it's not an Apache problem. If you change the Euphoria pgm. get a single character at a time, using getc(0), things will read ok. I added an integer variable len, and used value() to convert the environment("CONTENT_LENGTH") Then a loop Query = "" for i = 1 to len do Query &= getc(0) end for This reads the entire text, no 0 character anywhere. Regards, Irv