tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [slightly OT] FORM based authentication and utf-8 encoding of credentials
Date Wed, 26 Jun 2013 20:01:59 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Shanti,

On 6/26/13 11:00 AM, Shanti Suresh wrote:
> Hi Chris,
> 
> This is such an interesting discussion.  I am not sure what to make
> of this person's comment:
> 
> ------------------- TAXI   2012-10-09 09:03:59 PDT
> 
> Wow, no fix since 8 years...
> 
> And this is a real bug: If the HTTP header says the file is encoded
> in ISO-8859-1 the common way to override this with HTML is:
> 
> <meta http-equiv="Content-Type" content="text/html;
> charset=utf-8">
> 
> Firefox reads the body in UTF-8 then, which is fine, but the
> charset used in forms is still ISO-8859-1, so you have to add 
> accept-charset="utf-8" to the form just for firefox (other browser 
> automatically use UTF-8 or send the charset with the
> content-type).
> 
> So: Why the hell is nobody fixing this bug? ---------------
> 
> 
> So the questions I have are: (1) Firefox is not properly sending
> UTF-8 in the POST request even if it reads the HTML page in UTF-8? 
> And other browsers are now sending "charset=utf-8" based on the the
> HTML META tag?

This is just a convention: it's not defined by the spec. One could
argue that META should override HEADER, but the spec says the
opposite, actually.

> (2) Firefox has started respecting the accept-charset="utf-8"
> attribute in forms now such that it adds charset to the
> Content-Type header of the POST request?   I'm confused.  I thought
> Mozilla was not going to fix  this issue.

No, browsers will use accept-charset as the charset they use to encode
the POST request. The will still not likely add the charset attribute
to the Content-Type header, because the spec says not to do so.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRy0i2AAoJEBzwKT+lPKRYUfEQAKpBWbhF6sDKY1uA6v7HgqQ3
eRbANUtnknEPiOscJqjMcW8ZWdKJl1mucvKigPNXwJMYpTe3Q/c3r8RjVLV9TqtC
jgtWwxlS/GF3W8gO9BuLKva59dTbQtE+xyG12nNCJyxMHPow7WJWUIo4KVB4t0IB
vCTXwQT65DxMXZGwRMoc6eFI9idu5M0t1Luj+wnf5PxqV338WoZDx4N7QrSKS3Cj
z8S1OeA6uEqPHjSotl4Y7jgRBSSutP4AOwdnFjhBU81JWIZOl5+oaIemFcZgTcwm
0ZlcKThYud+BcH10mPv3nCieUSj1LHo6deEcCYMoNi3sEfSKlfvCW3XsQJI2T7xk
3jj+OplKqhYd8oMhg3sy7M2D25IenG0LJxnCADZutVhQ7U+qO3xKMeovymffNeXn
rLOLlxliUiZ0EhPpQSqbtloAOvO/klyECdZlHlILSkFFtMmiQf6yDYtXQLAQfgqK
o4/OAD9M7IqMLITmF4sUdt1fXfBjU7g/02tqmJWOP479XWbvqYHESG81XD6dR+PR
mFQu+gpIMAZJpIGcVWwMKvG7hMKP9jeNRBp+w5yOBj2BPg9s8Z6vBaonXVMAFN5c
VPzows5r1tx6YqKJkfEVpbswzRU4rx8HJHZUpYYBDpUhRztCQhcsFqKRj0d754cV
l9hb19ydVgu1Iz0ztsFZ
=MUYp
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message