![]() |
PB with euro sign and checkbox in multipart/form-data
Hi,
What do you think about the pb explained in this test script called form2dump.pl : #!/usr/bin/perl -w # Script written to solve the bug explained below : # PB : € sign in any form field corrupt beginning of multipart/form-data # in STDIN (1st lines with boundary & 1st field declar truncated) # CAUSE : checkbox without any value (uncheckd) cause this pb # - without <input type='checkbox' name='chk'>, it works # - with <input type='checkbox' name='chk'> checked, it works # NB : strange because an unchecked box shouldn't be sent ! # IDEA : I've tried to provide an hidden field with same name as # checkbox which would submit an 'off' value when checkbox is # unchecked, but both values are sent when checkbox is checked # SOL : ? print "Content-type: text/html; charset=iso-8859-1\n\n"; if ($ENV{'QUERY_STRING'} =~ /add/) { read STDIN, my $buff, $ENV{'CONTENT_LENGTH'}; print "<b>Multipart/form-data (ok because no binary data inside) </b><hr>$buff"; } else { print <<FORM; <form action='/cgi-bin/form2dump.pl?add' method='post' enctype='multipart/form-data' accept-charset='iso-8859- 1'> <input type='text' name='txt1'><br> <input type='text' name='txt2'><br> <input type='text' name='txt3'><br> <input type='text' name='txt4'><br> <input type='text' name='txt5'><br> <input type='submit'> <input type='checkbox' name='chk' value='on'> </form> FORM } exit 0; |
Re: PB with euro sign and checkbox in multipart/form-data
Yohan N. Leder wrote: > What do you think about the pb explained in this test script I think it appears that you are talking about a web browser bug. > # PB : € sign in any form field corrupt beginning of multipart/form-data > <form action='/cgi-bin/form2dump.pl?add' > method='post' enctype='multipart/form-data' accept-charset='iso-8859- > 1'> There is no € (Euro) in iso-8859-1 > <input type='text' name='txt1'><br> If your browser is allowing you to type a € into a one of those fields then it is broken and you should file a bug report. Having let you enter invalid data you say your browser then gets confused about constructing the multipart/form-data response but obviously there would be no point my attempting to reproduce this as my browser dosen't exhibit the first bug so can't be the one you are using. Anyhow I can't see haw any of this relates to Perl. |
Re: PB with euro sign and checkbox in multipart/form-data
Brian McCauley wrote: > Yohan N. Leder wrote: > > > What do you think about the pb explained in this test script > > I think it appears that you are talking about a web browser bug. > > > # PB : € sign in any form field corrupt beginning of multipart/form-data > > > <form action='/cgi-bin/form2dump.pl?add' > > method='post' enctype='multipart/form-data' accept-charset='iso-8859- > > 1'> > > There is no € (Euro) in iso-8859-1 > > > <input type='text' name='txt1'><br> > > If your browser is allowing you to type a € into a one of those > fields then it is broken and you should file a bug report. I have just noticed this bug is present in the browser I'm using after all. > Having let you enter invalid data you say your browser then gets > confused about constructing the multipart/form-data response but > obviously there would be no point my attempting to reproduce this as my > browser dosen't exhibit the first bug so can't be the one you are > using. My browser does not exibit the second bug. I'm guessing it may be to do with multi-byte encodings and the "Content-length" header. > Anyhow I can't see haw any of this relates to Perl. I stand by that. |
Re: PB with euro sign and checkbox in multipart/form-data
Yohan N Leder <ynleder@nspark.org> wrote:
> What do you think about the pb explained in this test script ^^ ^^ I read the whole program, but I did not see any explanation of Peanut Butter... -- Tad McClellan SGML consulting tadmc@augustmail.com Perl programming Fort Worth, Texas |
Re: PB with euro sign and checkbox in multipart/form-data
In article <1147975631.756701.251310@u72g2000cwu.googlegroups .com>,
nobull67@gmail.com says... > > Anyhow I can't see haw any of this relates to Perl. > > I stand by that. > It's just related to Perl because I'm using a Perl tet script to expose the bug and, obviously, if I'll go to post this same script in a groups not related to Perl, I'll heard : "no no, it's not related to our group, because your script is in Perl and we don't know Perl"... Well, I'm trying all the same in another group... Also, my test are done using IE6 FR under Win2K Pro and ActivePerl 5.8.7 |
Re: PB with euro sign and checkbox in multipart/form-data
In article <slrne6pqka.2c5.tadmc@magna.augustmail.com>,
tadmc@augustmail.com says... > I read the whole program, but I did not see any explanation > of Peanut Butter... > Did you ran the script ? |
Re: PB with euro sign and checkbox in multipart/form-data
In article <1147974127.600627.268740@j55g2000cwa.googlegroups .com>,
nobull67@gmail.com says... > There is no =80 (Euro) in iso-8859-1 > Right but I'm able to enter it using the [Alt-Gr] + E combination on Azerty keyboard. I've tried this on three stations using IE6 and Win2K or XP and, don't know why, but it works. |
Re: PB with euro sign and checkbox in multipart/form-data
Yohan N. Leder schreef:
> # PB : € sign in any form field corrupt beginning of You are including a character >127 in a posting that has no Content-Type header field that explains which character is meant there. Also there is no Content-Transfer-Encoding header field about 8bits. The default is 7bits (ASCII), so newsclients will set the highest bit of all out-of-band characters to zero. To find the error in the HTML that you generate, read http://en.wikipedia.org/wiki/ISO_8859-1 -- Affijn, Ruud "Gewoon is een tijger." |
Re: PB with euro sign and checkbox in multipart/form-data
Yohan N Leder <ynleder@nspark.org> wrote:
> In article <slrne6pqka.2c5.tadmc@magna.augustmail.com>, > tadmc@augustmail.com says... >> I read the whole program, but I did not see any explanation >> of Peanut Butter... >> > > Did you ran the script ? No. You seem to have missed my point. Please don't use cutsie spellings in Usenet posts. "PB" might mean "peanut butter". "problem" clearly means "problem", so use that instead. -- Tad McClellan SGML consulting tadmc@augustmail.com Perl programming Fort Worth, Texas |
Re: PB with euro sign and checkbox in multipart/form-data
In article <slrne6ri12.4n0.tadmc@magna.augustmail.com>,
tadmc@augustmail.com says... > "PB" might mean "peanut butter". > Sorry, it was out of habit while 'pb' means usually 'problem' in french |
| All times are GMT. The time now is 01:17 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.