DO NOT REPLY [Bug 34526] - Truncated content in decompressed requests from mod_deflate
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=34526. 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=34526 --- Additional Comments From [EMAIL PROTECTED] 2005-04-20 10:54 --- I'm using such settings in XML-RPC system, using Apache 2.x, mod_jk 1.2.x and tomcat 3.3.2 (so with a not too old jtc) and didn't have problem if the provided content lenght on the client side is set to -1. In such case, JTC/Tomcat will be able to get the complete data stream. Take a look at the XML-RPC HEAD CommonsXmlRpcTransport.java, where you could see the following code : ByteArrayOutputStream lBo = new ByteArrayOutputStream(); GZIPOutputStream lGzo = new GZIPOutputStream(lBo); lGzo.write(request); lGzo.finish(); lGzo.close(); byte[] lArray = lBo.toByteArray(); method.setRequestBody(new ByteArrayInputStream(lArray)); method.setRequestContentLength(-1); -- 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 34541] New: - hang on shutdown - countAllocated not synchronized
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=34541. 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=34541 Summary: hang on shutdown - countAllocated not synchronized Product: Tomcat 4 Version: 4.0.6 Final Platform: Sun OS/Version: Solaris Status: NEW Severity: major Priority: P1 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] This may be a problem in Tomcat 5.X too. We are seeing hangs during shutdown of Tomcat. The localhost_log shows a last line of 2005-04-20 06:03:06 StandardWrapper[/TomcatHang:hangServlet]: Waiting for 2 instance(s) to be deallocated. A thread dump shows the main thread waiting at at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1074). There are no HTTP processor threads running - they have all shutdown. Inspecting the code shows unload waiting for the variable countAllocated to go to zero. However, the code that increments and decrements countAllocated for non-single-threaded servlets is not synchronized, so the value will not be correct in some cases. To test this I added synchronized blocks to the increment/decrement code and no longer get hangs. -- 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 34541] - hang on shutdown - countAllocated not synchronized
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=34541. 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=34541 --- Additional Comments From [EMAIL PROTECTED] 2005-04-20 15:30 --- Created an attachment (id=14769) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14769action=view) Thread dump of hung Tomcat -- 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 34541] - hang on shutdown - countAllocated not synchronized
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=34541. 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=34541 --- Additional Comments From [EMAIL PROTECTED] 2005-04-20 15:31 --- Created an attachment (id=14770) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14770action=view) localhost_log -- 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]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java
remm2005/04/20 09:13:23 Modified:catalina/src/share/org/apache/naming/resources ResourceAttributes.java FileDirContext.java http11/src/java/org/apache/coyote/http11 InternalAprOutputBuffer.java Http11AprProcessor.java util/java/org/apache/tomcat/util/net AprEndpoint.java catalina/src/share/org/apache/catalina/connector Request.java catalina/src/share/org/apache/catalina/servlets DefaultServlet.java Log: - Fix setting timeouts on sockets. - Add plumbing code for sendfile (disabled by default), which doesn't work yet. - Apparently, the Sendfile.run algo is bad. APR is black magic to me, so I'll let Mladen fix it :) Revision ChangesPath 1.6 +13 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java Index: ResourceAttributes.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ResourceAttributes.java 29 Aug 2004 16:46:15 - 1.5 +++ ResourceAttributes.java 20 Apr 2005 16:13:23 - 1.6 @@ -753,6 +753,18 @@ } +/** + * Return the canonical path of the resource, to possibly be used for + * direct file serving. Implementations which support this should override + * it to return the file path. + * + * @return The canonical path of the resource + */ +public String getCanonicalPath() { +return null; +} + + // - Attributes Methods 1.8 +21 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/FileDirContext.java Index: FileDirContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FileDirContext.java 28 Jul 2004 20:27:01 - 1.7 +++ FileDirContext.java 20 Apr 2005 16:13:23 - 1.8 @@ -997,6 +997,9 @@ protected boolean accessed = false; +protected String canonicalPath = null; + + // - ResourceAttributes Methods @@ -1102,6 +1105,23 @@ return super.getResourceType(); } + +/** + * Get canonical path. + * + * @return String the file's canonical path + */ +public String getCanonicalPath() { +if (canonicalPath == null) { +try { +canonicalPath = file.getCanonicalPath(); +} catch (IOException e) { +// Ignore +} +} +return canonicalPath; +} + } 1.2 +0 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Index: InternalAprOutputBuffer.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- InternalAprOutputBuffer.java 14 Apr 2005 18:52:28 - 1.1 +++ InternalAprOutputBuffer.java 20 Apr 2005 16:13:23 - 1.2 @@ -20,7 +20,6 @@ import java.security.AccessController; import java.security.PrivilegedAction; -import org.apache.tomcat.jni.Error; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.buf.CharChunk; 1.8 +34 -2 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Http11AprProcessor.java 18 Apr 2005 16:47:47 - 1.7 +++ Http11AprProcessor.java 20 Apr 2005 16:13:23 - 1.8 @@ -158,6 +158,12 @@ /** + * Sendfile data. + */ +protected AprEndpoint.SendfileData sendfileData = null; + + +/** * Content delimitator for the request (if false, the connection will * be closed at
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11AprProtocol.java
remm2005/04/20 09:40:52 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProtocol.java Log: - Add needed get/set for sendfile. Revision ChangesPath 1.4 +8 -0 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java Index: Http11AprProtocol.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Http11AprProtocol.java18 Apr 2005 16:47:47 - 1.3 +++ Http11AprProtocol.java20 Apr 2005 16:40:52 - 1.4 @@ -280,6 +280,14 @@ setAttribute(port, + port); } +public boolean getUseSendfile() { +return ep.getUseSendfile(); +} + +public void setUseSendfile(boolean useSendfile) { +ep.setUseSendfile(useSendfile); +} + public InetAddress getAddress() { return ep.getAddress(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 20, 2005 9:13 AM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java remm2005/04/20 09:13:23 Modified:catalina/src/share/org/apache/naming/resources ResourceAttributes.java FileDirContext.java http11/src/java/org/apache/coyote/http11 InternalAprOutputBuffer.java Http11AprProcessor.java util/java/org/apache/tomcat/util/net AprEndpoint.java catalina/src/share/org/apache/catalina/connector Request.java catalina/src/share/org/apache/catalina/servlets DefaultServlet.java Log: - Fix setting timeouts on sockets. - Add plumbing code for sendfile (disabled by default), which doesn't work yet. - Apparently, the Sendfile.run algo is bad. APR is black magic to me, so I'll let Mladen fix it :) snip/ +// Pass special attributes to the native layer +if (name.startsWith(sendfile.)) { +coyoteRequest.setAttribute(name, value); +} + This should be 'org.apache.catalina.sendfile' (or, if you prefer, 'org.apache.tomcat.sendfile'). Otherwise, you'll get BZ reports like: whine In my application Filter I do request.setAttribute(sendfile.filename, new MySendFileName()); and my application breaks on 5.5.10. It worked fine on 5.5.9. /whine This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java
Bill Barker wrote: This should be 'org.apache.catalina.sendfile' (or, if you prefer, 'org.apache.tomcat.sendfile'). Otherwise, you'll get BZ reports like: whine In my application Filter I do request.setAttribute(sendfile.filename, new MySendFileName()); and my application breaks on 5.5.10. It worked fine on 5.5.9. /whine Well, I'll add a ckeck for the token to avoid this. It's completely broken anyway right now (Mladen says it can be fixed), so there's a chance that this feature will be scrapped. Passing attributes to the lower layer is harmless (and I don't quite like huge names, but I can change them if you want to). Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java
- Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Developers List tomcat-dev@jakarta.apache.org Sent: Wednesday, April 20, 2005 11:06 AM Subject: Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java Bill Barker wrote: This should be 'org.apache.catalina.sendfile' (or, if you prefer, 'org.apache.tomcat.sendfile'). Otherwise, you'll get BZ reports like: whine In my application Filter I do request.setAttribute(sendfile.filename, new MySendFileName()); and my application breaks on 5.5.10. It worked fine on 5.5.9. /whine Well, I'll add a ckeck for the token to avoid this. It's completely broken anyway right now (Mladen says it can be fixed), so there's a chance that this feature will be scrapped. I remember reading a while back on [EMAIL PROTECTED] that there were some problems with sendfile on Windows. I don't remember the details, and I don't follow [EMAIL PROTECTED] to know if they have been fixed. Passing attributes to the lower layer is harmless (and I don't quite like huge names, but I can change them if you want to). I don't care if you pass all attributes to the Coyote Request. It might even be A Good Thing. It's just that if we follow the spec recommendation in section 4.2, we can say that the 'org.apache.catalina' attribute name space is reserved for Tomcat internal attributes. Reserving the 'sendfile' namespace for Tomcat internals is rather arbitrary, and more likely to break webapps. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java
Bill Barker wrote: I remember reading a while back on [EMAIL PROTECTED] that there were some problems with sendfile on Windows. I don't remember the details, and I don't follow [EMAIL PROTECTED] to know if they have been fixed. sendfile itself seems to work fine so far (I feed it with the canonical path of the file), but however the %ç$!!*ç% poller doesn't do what it should be doing (hence my comment about a black magic API). I seems blocking sendfiles would be working ok, but there are little benefits. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34546] New: - Cannot remove first valve from pipeline
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=34546. 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=34546 Summary: Cannot remove first valve from pipeline Product: Tomcat 5 Version: 5.5.8 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Hi! It's not possible to remove the first valve from the default Pipeline-Implementatation. There was no special code for first, only for re-pointing the next elements. Sorry, I do not have the code at hand right now, but simply try to add a valve ant remove it - see, it's still there. Bye Chris -- 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 34547] New: - Tomcat forgets a session attribute when reloading context
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=34547. 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=34547 Summary: Tomcat forgets a session attribute when reloading context Product: Tomcat 5 Version: 5.5.9 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Unknown AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Hi 'catters. I am having a small but annoying behavior in Tomcat. Tested on 5.0.28 and 5.5.9 I use Eclipse 3.02 for development, along the Sysdeo Tomcat Plugin and Freemarker for MVC. My context path is set to be reloadable, and when i am coding, if i make some change to the code, the context gets reloaded by the plugin, and a session attribute gets null'ed. The weirdest thing is that not all of the session attributes are nulled. Just this one we will call user. I will try to explain what happens with pseudocode. When the users log on to my application, this happens: ForumUser user = run_sql_here; ForumUser is a bean with some properties. That query stores: -a user id (int) -a timezone (string) -a language (string) All of the other attributes in the object are not used at this time. session.setAttribute(logged_user_name,username); session.setAttribute(permission,permissions); if (user!=null) { session.setAttribute(userpreferences,user); } This is the ONLY time that attribute gets set. It ONLY gets removed when the session is invalidated. When i change code and the context gets reloaded, the user attribute gets null, and the other 2 attributes (permission and logged_user_name) are OK If i don't reload the context, everything is OK. Does anyone have any idea of what is going on? Do you guys need my code? I will gladly do whatever test you need me to do to resolve this. It is very annoying to keep logging out and back in to test new code so my session gets corrected -- 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 34547] - Tomcat forgets a session attribute when reloading context
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=34547. 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=34547 --- Additional Comments From [EMAIL PROTECTED] 2005-04-21 04:13 --- Oh sorry i should have mentioned that i use java 1.4.2_07 on linux (arch linux), kernel 2.6.11 with glibc 2.3.4 with NTPL -- 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]