DO NOT REPLY [Bug 34113] - [PATCH] setHeader( ) method in Response object does not clear multiple values

2005-03-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34113.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34113


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-03-25 17:38 ---
This is fixed now in the CVS, and will appear in 5.5.9.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34113] - [PATCH] setHeader( ) method in Response object does not clear multiple values

2005-03-24 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34113.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34113





--- Additional Comments From [EMAIL PROTECTED]  2005-03-23 17:55 ---
The problem is not the cost of the comparisons, but of removeHeader if it
matches anything, so -1 for any of the proposed patches. I will fix it
eventually, but the issue is small enough that it is ok to not fix it 
immediately.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34113] - [PATCH] setHeader( ) method in Response object does not clear multiple values

2005-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34113.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34113





--- Additional Comments From [EMAIL PROTECTED]  2005-03-21 20:33 ---
Created an attachment (id=14526)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14526action=view)
WAR file showing multiple value headers are not reset with call to setHeader( )

The WAR file contains an index.jsp that redirects the user to a servlet that
triggers the bug.  You will need to view the response headers to see the
violation.  The servlet may be accessed directly with the request:

GET /SetHeaders/SetHeaders HTTP/1.0

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34113] - [PATCH] setHeader( ) method in Response object does not clear multiple values

2005-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34113.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34113





--- Additional Comments From [EMAIL PROTECTED]  2005-03-21 20:34 ---
Created an attachment (id=14527)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14527action=view)
Proposed patch

Original bug summary describes the decisions made for the patch.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34113] - [PATCH] setHeader( ) method in Response object does not clear multiple values

2005-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34113.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34113





--- Additional Comments From [EMAIL PROTECTED]  2005-03-21 21:12 ---
-1 for the proposed patch (quite inefficient).

Overall, I think the issue is trivial while the change to make it work
efficiently is not exactly trivial, so there is no hurry to fix this.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34113] - [PATCH] setHeader( ) method in Response object does not clear multiple values

2005-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34113.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34113


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #14527|0   |1
is obsolete||




--- Additional Comments From [EMAIL PROTECTED]  2005-03-22 02:01 ---
Created an attachment (id=14531)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14531action=view)
Slightly more efficient patch - one interation over the list of headers

This patch changes the setValue( ) method call to an addValue( ) method call to
avoid needlessly iterating over the entire list in the call to setValue(
)--since setValue( ) will not find a header with given name after all headers
with that name have been removed.

After this patch, a call to setHeader( ) will require one full iteration
through the list of headers; whereas current CVS iterates over half the list,
on average, inside the call to setValue( ).  Therefore, assuming the
DEFAULT_HEADER_SIZE of 8, this will mean an additional 4 String comparisons,
but without using a hash or some kind of custom search tree or redesigning
MimeHeaders with multiple header values in mind, a full iteration over the list
is unavoidable.  So, are the additional String comparisons a small enough price
to pay for compliance?  :)

A better solution is to fix the setValue( ) method of the MimeHeaders
class--assuming (since the partial javadoc doesn't say so) that setValue( )
should replace all existing headers having the given name.  If this is the
intended behavior of the setValue( ) method, the next patch could be used
instead.  It's consequences (and implementation) are identical to those of this
patch.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 34113] - [PATCH] setHeader( ) method in Response object does not clear multiple values

2005-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34113.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34113





--- Additional Comments From [EMAIL PROTECTED]  2005-03-22 02:06 ---
Created an attachment (id=14532)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14532action=view)
Patch to fix the setValue( ) method of MimeHeaders (on which Response's
setHeader( ) method relies)

This patch implements the changes given in
http://issues.apache.org/bugzilla/attachment.cgi?id=14531 in the MimeHeaders
method setValue( ) instead of the Response method setHeader( ).  The
consequences and implementation are the same as those described in the patch
for Response.

Only one of the patches should be used.  Since the partial javadoc for the
setValue( ) method was not clear about its intended behavior, I was unsure
which class should be changed.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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