Re: mod_jk codepage in header values

2010-02-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 1/30/2010 7:56 AM, Rainer Jung wrote: > So I expect you can forward any binary garbage you like, as long as you > make sure the code putting it into the environment variables doesn't > already do any encoding or decoding. This was pretty m

Re: mod_jk codepage in header values

2010-01-30 Thread Rainer Jung
On 29.01.2010 22:20, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mirko, On 1/29/2010 4:02 AM, Mirko Solic wrote: Secondly i try to define JkEnvVar directive for non existent environment variable and i added also default value with some no ISO-8859-1 characters. My

Re: mod_jk codepage in header values

2010-01-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mirko, On 1/29/2010 4:02 AM, Mirko Solic wrote: > Secondly i try to define JkEnvVar directive for non existent environment > variable and i added also default value with some no ISO-8859-1 > characters. My conf file is in utf8 encoding so default valu

Re: mod_jk codepage in header values

2010-01-29 Thread Mirko Solic
> > OK. He was my mistake i thought that mod_jk automatically takes > > environment variables and puts them in header. But, yes, as you said > > this is done by AAI. So right encoding should be done by AAI side. Thank > > you for clearing that up. > > Let us know what AAI says about this. OK.

Re: mod_jk codepage in header values

2010-01-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mirko, On 1/27/2010 3:02 AM, Mirko Solic wrote: > OK. He was my mistake i thought that mod_jk automatically takes > environment variables and puts them in header. But, yes, as you said > this is done by AAI. So right encoding should be done by AAI si

Re: mod_jk codepage in header values

2010-01-27 Thread Mirko Solic
> > According to André Warnier: > > > >> But, because the HTTP RFC specifies that HTTP headers > >> should contain only US-ASCII character data, mod_jk would be allowed, > >> if > >> it finds non-US-ASCII data in a HTTP header, to strip this data or > >> ignore the header or something like that.

Re: mod_jk codepage in header values

2010-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mirko, On 1/25/2010 4:24 AM, Mirko Solic wrote: > On Thu, 2010-01-21 at 10:34 -0500, Christopher Schultz wrote: >> What would be better is to do something like this: >> >> java.net.URLEncoder.encode(request.getHeader(headerName), "UTF-8") >> >> Of cou

Re: mod_jk codepage in header values

2010-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mirko, On 1/25/2010 4:06 AM, Mirko Solic wrote: > How i understand i don't have control when environment variables on > apache side are putted in http header and sent to tomcat side. This is > done by mode_jk automatically. > I would hate to put enco

Re: mod_jk codepage in header values

2010-01-25 Thread Mirko Solic
On Thu, 2010-01-21 at 10:34 -0500, Christopher Schultz wrote: > On 1/21/2010 6:43 AM, Mirko Solic wrote: > > That what i'm afraid of. This code: new > > String(request.getHeader(headerName).getBytes("ISO-8859-1")) works for > > now but it really shouldn't work. > > That way i'm searching for more

Re: mod_jk codepage in header values

2010-01-25 Thread Mirko Solic
On Thu, 2010-01-21 at 15:21 +0100, André Warnier wrote: > Mirko Solic wrote: > > On Thu, 2010-01-21 at 11:30 +0100, André Warnier wrote: > > > Mirko, > just for info : there is a related other thread taking place at the same > time, entitled "Basic Authentication Failed with multibyte username".

Re: mod_jk codepage in header values

2010-01-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 1/21/2010 9:21 AM, André Warnier wrote: > But then, such header field values MUST be encoded according to the > rules of RFC 2047. Unfortunately, Tomcat does not follow RFC2047, at least not according to http://stackoverflow.com/questions/3

Re: mod_jk codepage in header values

2010-01-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mirko, On 1/21/2010 6:43 AM, Mirko Solic wrote: > That what i'm afraid of. This code: new > String(request.getHeader(headerName).getBytes("ISO-8859-1")) works for > now but it really shouldn't work. > That way i'm searching for more legitimate way.

Re: mod_jk codepage in header values

2010-01-21 Thread André Warnier
Mirko Solic wrote: On Thu, 2010-01-21 at 11:30 +0100, André Warnier wrote: Mirko, just for info : there is a related other thread taking place at the same time, entitled "Basic Authentication Failed with multibyte username". Basically, I am interested in those topics because I encounter them

Re: mod_jk codepage in header values

2010-01-21 Thread Mirko Solic
On Thu, 2010-01-21 at 11:30 +0100, André Warnier wrote: This was quite replay :). Thanks for you time and knowledge. > Mirko, > I am from Belgium, Europe too. I live in Spain and work mostly for > German and other international customers (among which are some from > Poland too). This to say th

Re: mod_jk codepage in header values

2010-01-21 Thread André Warnier
Mirko Solic wrote: Christopher thanks for quick replay. ... I'm from Slovenija, Europe. We are using character that are not defined in ASCII so we are using UTF-8 cp. I will try to explain what is this application about. This project (web page) is protected with AAI (http://www.switch.ch

Re: mod_jk codepage in header values

2010-01-21 Thread Mirko Solic
Christopher thanks for quick replay. > > for connecting tomcat with apache i'm using mod_jk connector. But i'm > > having problem with header values. On apache side headers values are in > > UTF-8 cp but on tomcat side i have to make conversion from latin-1 cp. > > Hmm. > > HTTP defines header v

Re: mod_jk codepage in header values

2010-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mirko, On 1/20/2010 9:42 AM, Mirko Solic wrote: > for connecting tomcat with apache i'm using mod_jk connector. But i'm > having problem with header values. On apache side headers values are in > UTF-8 cp but on tomcat side i have to make conversion f

mod_jk codepage in header values

2010-01-20 Thread Mirko Solic
Hello, for connecting tomcat with apache i'm using mod_jk connector. But i'm having problem with header values. On apache side headers values are in UTF-8 cp but on tomcat side i have to make conversion from latin-1 cp. I'm using this code: for(Enumeration en = request.getHeaderNames(); en.hasMor