Re: Cookies are broken in 6.0.16?

2008-02-12 Thread Sven Köhler

Actually, the spec doesn't disagree with chosing any of the = ...
But some users have supplied some reasonable arguments (base64 is
padding with =, etc.) to rather chose the first = over the other ones.
  

in that case, the user should use v1 cookies :)


Yes, right, you're 100% right - but this thread is not about v1 cookies. 
It's about v0 cookies.


In the case of v0 cookies, we hit the "damn, the spec is messed up - 
what should we do?"-case. And in this case, well - what do we do?


What would REALLY be best, is to throw exception upon setting a name or 
a value containg the = sign, or spaces, or any illegal characters of 
that kind.
Soon, after some future versions of Tomcat, the mailinglist may actually 
experience, that people start using names containg the = character, 
because chosing the last = character in the cookie for splitting permits 
them to do so.


Well, simply make things REALLY safe (throwing exception and the like - 
well, does the servlet spec allow to do so? oh my god - i can see it 
coming: it doesn't.) Or rather try to immitate the old behaviour as good 
as you can without violating the spec, or the TCK test, etc.
And it seems to be the case, that people don't use names containg the = 
character but rather use values that do which was possible with the old 
behaviour - and indeed seems to me to be the use-case used much more 
often then the "name contains =" use-case.


So if satisfying users really matters to you, you developers really have 
the choice, since the spec gives you that freedom, you really should ...




signature.asc
Description: OpenPGP digital signature


Re: Cookies are broken in 6.0.16?

2008-02-11 Thread Sven Köhler
> v0 cookies, the spec says
> 
> /NAME/=/VALUE/
>This string is a sequence of characters excluding semi-colon, comma
>and white space. If there is a need to place such data in the name
>or value, some encoding method such as URL style %XX encoding is
>recommended, though no encoding is defined or required.
> 
> the problem was that encoding wasn't defined nor required. so when we
> followed the spec, and added %XX encoding, TCK tests failed.

Does splitting at the first = fail the TCK tests?



signature.asc
Description: OpenPGP digital signature


Re: Cookies are broken in 6.0.16?

2008-02-11 Thread Sven Köhler
> The difficulty here is that although '=' is the delimiter between NAME and
> VALUE there is no need to encode it if it appears in the name or the value.
> This causes some ambiguities when parsing a header of the form:
> Set-Cookie: foo=bar=bartoo
> 
> Is the name 'foo' or 'foo=bar'? Is the value 'bar=bartoo' or 'bartoo'?
> 
> The changes to the cookie parsing mean the second '=' and any text beyond
> it are now ignored.

!???

By instinct, i would have chosen the first = to split the string into
NAME and VALUE.

Why have you chosen the second = or maybe eben the last = occuring in
the cookie-string?

Actually, the spec doesn't disagree with chosing any of the = ...
But some users have supplied some reasonable arguments (base64 is
padding with =, etc.) to rather chose the first = over the other ones.



signature.asc
Description: OpenPGP digital signature


Re: [PATCH] - Remove redundant code in Mapper.java

2007-03-26 Thread Sven Köhler
>> Attached is a simple patch (for TC 6.0's trunk) that removes a couple
>> of lines of redundant code in org.apache.tomcat.util.http.mapper.Mapper
> 
> I am not certain they're that redundant. I would leave them in just to
> be safe given that the cost of these calls is very low.

They are not redundant.

Arvind, take a look at the class org.apache.tomcat.util.buf.MessageBytes:
setString(String) does influence the members byteC or charC.

The MessageBytes-class can store 3 different values at once: byte[],
char[], String. These 3 values are not automatically synchronized.
Actually byteC can contain "foo", charC can contain "bar" and strValue
can contain "bla" at the same time.




signature.asc
Description: OpenPGP digital signature


Why JkCoyoteHandler instead of AjpProtocol?

2007-03-05 Thread Sven Köhler
Hi,

in org/apache/catalina/connector/Connector.java, the default classname
for the AJP-protocol is "org.apache.jk.server.JkCoyoteHandler" instead
of org.apache.coyote.ajp.AjpProtocol.

My personal problem is, that i'd like to have flush-packets.
org.apache.jk.server.JkCoyoteHandler does not use them.

Is org.apache.coyote.ajp.AjpProtocol not considered stable yet?
Can JkCoyoteHandler be extended to use flush-packets?


Thanks,
  Sven



signature.asc
Description: OpenPGP digital signature


Re: [VOTE] Release build 5.5.23

2007-03-03 Thread Sven Köhler
> Is this Tomcat Native thing now required?
> 
> It wasn't in 5.5.22 (the test build anyhow).
> 
> Is it normal to change the requirements for how the system operates on a
> point release?

It's not required for 6.0.10 and i wouldn't want it to be required.

I don't like too much native stuff.



signature.asc
Description: OpenPGP digital signature


Re: Debugging tomcat

2007-03-02 Thread Sven Köhler
> On the tomcat side: depending on your exact connectors, set Log Level
> for org.apache.jk, org.apache.ajp, org.apache.coyote to debug.

I tried appending "org.apache.level = FINE" to logging.properties of
tomcat 6.0.10.

But catalina.out doesn't contain any addition information. Hmm ...

Also appended the line "org.apache.handler =
java.util.logging.ConsoleHandler".

Still nothing additional in catalina.out :-(
Hmm ...

Can somebody point me at my mistake?


Thanks,
  Sven




signature.asc
Description: OpenPGP digital signature


Debugging tomcat

2007-03-02 Thread Sven Köhler
Hi,

i'd like to investigate about some bug - or at least something, of which
i think, that it is a bug.

Therefor, i would like to somehow dump all the AJP-packets, that are
exchanged between mod_jk and tomcat.

Is there some packet-dump-feature of either mod_jk or tomcat, that i
could use?


Thanks,
  Sven



signature.asc
Description: OpenPGP digital signature


Re: [ANN] Apache Tomcat JK 1.2.21 Web Server Connector released

2007-03-02 Thread Sven Köhler
> The Apache Tomcat team is pleased to announce the immediate availability
> of version 1.2.21 of the Apache Tomcat Connectors.

Thanks! I desperately waited for it! ;-)


If i may ask a quick question:
what's that log output in mod_jk.log, looking like this?

[Fri Mar 02 23:02:48 2007] worker1 www.jugendherberge.de 0.045109
[Fri Mar 02 23:02:51 2007] worker1 www.jugendherberge.de 0.019886
[Fri Mar 02 23:02:51 2007] worker1 www.jugendherberge.de 0.047229
[Fri Mar 02 23:02:52 2007] worker1 www.jugendherberge.de 0.038092


JkLogLevel is set to info.
Also tried error.

Actually, if i had a wish, i'd like to have only error-messages in
mod_jk.log.





signature.asc
Description: OpenPGP digital signature


Re: 5.5.21?

2007-01-29 Thread Sven Köhler
One fix of interest that I am aware of in 5.5.21 is the AJP flush 
packets fix.


Me too!

I'd like to see a 5.5.21 release too.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AJP flush packets?

2007-01-02 Thread Sven Köhler
Mladen Turk schrieb:
> Sven Köhler wrote:
>> Hi,
>>
>> i see, you're developing Tomcat 6.0.
>>
>> Will Tomcat 6.0 send flush packets, when the flush()-method of the
>> OutputStreams or the Writers are called?
> 
> Yes. It's done in a way that is backward compatible.
> When out.flush() is called an empty data packet is sent.

I have one more question:

Is this going to be "backported" to Tomcat 5.5?



Regards,
  Sven



signature.asc
Description: OpenPGP digital signature


Re: AJP flush packets?

2006-11-12 Thread Sven Köhler
>> i see, you're developing Tomcat 6.0.
>>
>> Will Tomcat 6.0 send flush packets, when the flush()-method of the
>> OutputStreams or the Writers are called?
> 
> Yes. It's done in a way that is backward compatible.
> When out.flush() is called an empty data packet is sent.

Did it really need to be done like that? :-(

Well, not matter how, but it was done, so it's a reason to be happy :-)

>> It's something really needed by mod_proxy_ajp, mod_jk, and so on to
>> property transport flushes to.
> 
> The implementation is in the SVN both for mod_jk
> and mod_proxy_ajp. You will have to wait for the
> next release (mod_jk 1.2.20) if you don't wish to
> use the SVN builds.

Thanks for the hints! So i will wait for mod_jk 1.2.20.



signature.asc
Description: OpenPGP digital signature


AJP flush packets?

2006-11-11 Thread Sven Köhler
Hi,

i see, you're developing Tomcat 6.0.

Will Tomcat 6.0 send flush packets, when the flush()-method of the
OutputStreams or the Writers are called?

It's something really needed by mod_proxy_ajp, mod_jk, and so on to
property transport flushes to.


Greetings,
  Sven



signature.asc
Description: OpenPGP digital signature