Shibboleth, Tomcat, AJP and UTF-8 conversion
Cantor, Scott
cantor.2 at osu.edu
Thu Oct 20 10:36:18 EDT 2016
> Do you mean the W3C spec? I can't comment. Those folks are waaaay above
> my pay grade.
Whatever spec Tomcat is following such that it assumes the encoding of data coming from a client that obviously specifies its own.
> Yes. The common solution is to specify one or both of the following in
> <Connector> in server.xml:
That's all I know.
> I suspect its because my data, for whatever reason, is NOT coming to me %
> encoded. mod_jk is putting it into environment variables and the delivering
> it via AJP in the body of a GET.
AJP isn't HTTP, so there's no GET here, it's a binary channel delivering a pickled form of the HTTP request. The data in the headers or server variables (what are informally referred to as CGI variables) are not URL-encoded in general, no.
> The data bytes are percolating thru Tomcat correctly (I've verified them) until
> they get handled by ByteChunk and converted to a String.
If you found the code doing it, then I guess it should be evident whether that conversion is happening conditionally based on any settings or not, but if not, I don't know why people have claimed the connector encoding changes things.
> Can you please explain that statement? I don't understand.
You found what seems to be a community-offered workaround for doing a conversion of the data back into UTF-8, and so obviously the thing to do is to try it. You seemed to be unsure whether that trick would work, but since the trick is about doing something to a String, it doesn't depend on where the String came from. getHeader, getAttribute, doesn't matter. Same difference. If the data is encoded in ISO-whatever, the trick will work.
-- Scott
More information about the users
mailing list