Re: svn commit: r367115 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java
[EMAIL PROTECTED] wrote: Author: markt Date: Sun Jan 8 14:48:43 2006 New Revision: 367115 URL: http://svn.apache.org/viewcvs?rev=367115view=rev Log: Fix bug 29214. containsHeader() not working for Content-Length and Content-Type I don't like this fix (to a non issue), but since I have the opportunity of not using it, you can leave it in if you want to. Rather than adding complexity in code which is critical, I would have hacked instead the org.apache.catalina.connector.Response.containsHeader method, which is not actually used at all (except by application code, IMO for weird reasons). Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r367115 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java
Remy Maucherat wrote: [EMAIL PROTECTED] wrote: Fix bug 29214. containsHeader() not working for Content-Length and Content-Type Rather than adding complexity in code which is critical, I would have hacked instead the org.apache.catalina.connector.Response.containsHeader method, which is not actually used at all (except by application code, IMO for weird reasons). I'll look into an alternative patch that has less impact on the critical code. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r367115 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java
If you're looking to reduce complexity - one idea would be to check if the redundant fields are actually needed, because that's the actual source of the problem. I can only think of performance benefits - storing the contentLength as an int may be a good way to avoid conversion to and from String - but the headers are stored as MessageBytes, and that supports storing the int value. If the redundant values are used to avoid looking up the header - storing the MessageBytes value could solve this. If you decide to fix it at the higher layer - maybe you can also deprecate the method containsHeader in Response or put a big javadoc saying that it's not very accurate. Costin On 1/9/06, Mark Thomas [EMAIL PROTECTED] wrote: Remy Maucherat wrote: [EMAIL PROTECTED] wrote: Fix bug 29214. containsHeader() not working for Content-Length and Content-Type Rather than adding complexity in code which is critical, I would have hacked instead the org.apache.catalina.connector.Response.containsHeader method, which is not actually used at all (except by application code, IMO for weird reasons). I'll look into an alternative patch that has less impact on the critical code. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]