DO NOT REPLY [Bug 21157] - CookieExample is setting cookie after writing data
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157 CookieExample is setting cookie after writing data --- Additional Comments From [EMAIL PROTECTED] 2003-06-30 17:25 --- Here are some facts that may lead you to reconsider. - The servlet spec itself does not mandate a default size for the buffer. The user can call response.setBufferSize to set the buffer to any size. - The user can tweak the bufferSize attribute of coyote or the legacy connector in server.xml. There is nothing preventing user to set it to 0 in which case the cookie example immediately breaks. - Users tend to use these examples as base for something that they like to achieve. So it is a good idea to provide users with an example that is more robust and does not break depending on how much data they write or what settings they have in server.xml. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21157] - CookieExample is setting cookie after writing data
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157 CookieExample is setting cookie after writing data [EMAIL PROTECTED] changed: What|Removed |Added Severity|Normal |Enhancement Status|RESOLVED|REOPENED Priority|Other |Low Resolution|INVALID | --- Additional Comments From [EMAIL PROTECTED] 2003-07-01 00:06 --- Well, I wasn't too happy with Remy's decision to mark this bug as invalid, either. Having thought about this for a while, I ended up with a list of facts almost identical to the one posted by Vichy. For an example refered to as a starting point for servlet developers and used as a source for copypaste best effort should be made to use good coding practises. Therefore, I decided to reopen this bug. I am currently working on a patch which I will soon propose for discussion. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21157] - CookieExample is setting cookie after writing data
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157 CookieExample is setting cookie after writing data --- Additional Comments From [EMAIL PROTECTED] 2003-07-01 00:28 --- Created an attachment (id=7033) Proposed patch moving call to response.addCookie() before response.getWriter() - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21157] - CookieExample is setting cookie after writing data
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21157 CookieExample is setting cookie after writing data [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2003-06-28 17:06 --- Well, I disagree. The buffer default size is specified in the spec (it's 2K I think). Hence, if you write a small amount of data, the response will not be committed and the cookies can be set reliably. You can also set the buffer size manually, BTW. So this will not be addressed; please do not reopen the report. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]