svn commit: r543852 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

2007-06-03 Thread mturk
Author: mturk
Date: Sat Jun  2 23:59:41 2007
New Revision: 543852

URL: http://svn.apache.org/viewvc?view=rev&rev=543852
Log:
Handle the disconnected sockets logging differently from the dead one.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diff&rev=543852&r1=543851&r2=543852
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sat Jun  2 
23:59:41 2007
@@ -1212,9 +1212,18 @@
 if (err ||
 ((rc = ajp_connection_tcp_send_message(ae, op->request, l)) != 
JK_TRUE)) {
 if (rc != JK_FATAL_ERROR) {
-jk_log(l, JK_LOG_INFO,
-   "(%s) error sending request. Will try another pooled 
connection",
-   ae->worker->name);
+if (err == 1) {
+jk_log(l, JK_LOG_DEBUG,
+   "(%s) failed sending request. "
+   "Will try another pooled connection",
+ae->worker->name);
+}
+else {
+jk_log(l, JK_LOG_INFO,
+   "(%s) error sending request. "
+   "Will try another pooled connection",
+ae->worker->name);
+}
 ajp_next_connection(ae, l);
 }
 else {
@@ -1236,13 +1245,27 @@
  * If we failed to reuse a connection, try to reconnect.
  */
 if (!IS_VALID_SOCKET(ae->sd)) {
-if (err) {
-/* XXX: If err is set, the tomcat is either dead or disconnected */
+if (err == 1) {
+/* If err is set, the tomcat is disconnected */
+jk_log(l, JK_LOG_INFO,
+   "(%s) all endpoints are disconnected", ae->worker->name);
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
+else if (err) {
+/* If err is set, the tomcat is dead */
 jk_log(l, JK_LOG_INFO,
-   "(%s) all endpoints are %s",
-   ae->worker->name, err == 1 ? "disconnected" : "dead");
+   "(%s) all endpoints are dead", ae->worker->name);
+/* TODO: What is the purpose of the following log message?
+ *   IMO it is very confusing and does not reflect the
+ *   real reason (CPING/CPONG failed) of the error.
+ *   Further more user might deliberately set the
+ *   connectionTimeout and this is normal operational
+ *   message in that case.
+ */
 jk_log(l, JK_LOG_INFO,
-   "(%s) increase the backend idle connection timeout or the 
connection_pool_minsize",
+   "(%s) increase the backend idle connection "
+   "timeout or the connection_pool_minsize",
ae->worker->name);
 JK_TRACE_EXIT(l);
 return JK_FALSE;



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



svn commit: r543853 - in /tomcat/connectors/trunk/jk: native/common/jk_connect.c xdocs/miscellaneous/changelog.xml

2007-06-03 Thread mturk
Author: mturk
Date: Sun Jun  3 00:08:36 2007
New Revision: 543853

URL: http://svn.apache.org/viewvc?view=rev&rev=543853
Log:
Use initial zero timeout for select call. Patch provided by David McLaughlin.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_connect.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?view=diff&rev=543853&r1=543852&r2=543853
==
--- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Sun Jun  3 00:08:36 
2007
@@ -654,15 +654,18 @@
 FD_ZERO(&fd);
 FD_SET(sock, &fd);
 
-/* Wait one microsecond */
+/* Initially test the socket without any blocking.
+ */
 tv.tv_sec  = 0;
-tv.tv_usec = 1;
+tv.tv_usec = 0;
 
 do {
 rc = select((int)sock + 1, &fd, NULL, NULL, &tv);
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
 errno = WSAGetLastError() - WSABASEERR;
 #endif
+/* Wait one microsecond on next select, if EINTR */
+tv.tv_usec = 1;
 } while (rc == -1 && errno == EINTR);
 
 if (rc == 0) {

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=543853&r1=543852&r2=543853
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Jun  3 
00:08:36 2007
@@ -28,6 +28,15 @@
   
 
   
+  Use initial zero timeout for jk_is_socket_connected. The resulting
+  detection is the same but offers a huge performance increase
+  with mod_jk. In most cases the Operating System does not favor
+  the 1 microsecond timeout, but it rather rounds that up to much
+  higher value (frequency of interrupt timer which on most systems
+  defaults to 100Hz).
+  Patch provided by David McLaughlin. (mturk)
+  
+  
   Always build with thread support, unless flag --enable-prefork
   is set during for configure. (rjung)
   



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



DO NOT REPLY [Bug 40668] - MailSessionFactory is missing in Tomcat 5.5.23

2007-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=40668


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
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]



svn commit: r544037 - in /tomcat/connectors/trunk/jk/xdocs: reference/apache.xml webserver_howto/apache.xml

2007-06-03 Thread markt
Author: markt
Date: Sun Jun  3 20:22:01 2007
New Revision: 544037

URL: http://svn.apache.org/viewvc?view=rev&rev=544037
Log:
A better warning for the httpd docs.

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?view=diff&rev=544037&r1=544036&r2=544037
==
--- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Sun Jun  3 20:22:01 
2007
@@ -25,10 +25,14 @@
 Exceptions from this rule are
 again explicitely listed in the table below.
 
-The Apache httpd DocumentRoot should not overlap with a Tomcat Host's
-appBase or the docBase of any Context. Configuring httpd/Tomcat this way is 
very
-likely to result in JSP source code disclosure and/or other security issues.
-
+Waring: If Apache httpd and Tomcat are configured to serve content from
+the same filing system location then care must be taken to ensure that httpd is
+not able to serve inappropriate content such as the contents of the WEB-INF
+directory or JSP source code. This could occur if the httpd DocumentRoot
+overlaps with a Tomcat Host's appBase or the docBase of any Context. It could
+also occur when using the httpd Alias directive with a Tomcat Host's appBase or
+the docBase of any Context.
+
 
 Here are the all directives supported by Apache:
 
@@ -119,7 +123,11 @@
 
 
 Automatically Alias webapp context directories into the Apache
-document space. 
+document space.
+
+Care should be taken to ensure that only static content is served via httpd as 
a
+result of using this directive. Any static content served by httpd will bypass 
any
+security constraints defined in the application's web.xml.
 
 For inheritance rules, see: JkMountCopy.
 
@@ -697,9 +705,12 @@
 the Apache document space. It enables Apache to serve a static context while 
Tomcat
 serving dynamic context. This directive is used for convenience so that you 
don't
 have to put an apache Alias directive for each application directory inside 
Tomcat's
-webapp directory.
+webapp directory. For security reasons is is strongly recommended that JkMount
+is used to pass all requests to Tomcat by default and JkUnMount is used to
+explicitly exclude static content to be served by httpd. It should also be 
noted
+that content served by httpd will bypass any security constraints defined in 
the
+applciation's web.xml.
 
-
 
   # enter the full path to the tomcat webapps directory
   JkAutoAlias /opt/tomtact/webapps

Modified: tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml?view=diff&rev=544037&r1=544036&r2=544037
==
--- tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Sun Jun  3 
20:22:01 2007
@@ -44,10 +44,14 @@
 and Apache.
 
 
-The Apache httpd DocumentRoot should not overlap with a Tomcat Host's
-appBase or the docBase of any Context. Configuring httpd/Tomcat this way is 
very
-likely to result in JSP source code disclosure and/or other security issues.
-
+Waring: If Apache httpd and Tomcat are configured to serve content from
+the same filing system location then care must be taken to ensure that httpd is
+not able to serve inappropriate content such as the contents of the WEB-INF
+directory or JSP source code. This could occur if the httpd DocumentRoot
+overlaps with a Tomcat Host's appBase or the docBase of any Context. It could
+also occur when using the httpd Alias directive with a Tomcat Host's appBase or
+the docBase of any Context.
+
 
 
 This document was originally part of Tomcat: A Minimalistic User's 
Guide written by Gal Shachor,
@@ -712,8 +716,11 @@
 
 
 
-Caution: If Apache is configured to serve static pages for a web application 
it bypasses
-any security contraints you may have configured in your web application 
web.xml config file.
+Caution: For security reasons is is strongly recommended that JkMount is used 
to
+pass all requests to Tomcat by default and JkUnMount is used to explicitly
+exclude static content to be served by httpd. It should also be noted that
+content served by httpd will bypass any security constraints defined in the
+applciation's web.xml.
 
 
 Use Apache's Alias directive to map a single web application context 
directory into Apache's
@@ -723,15 +730,12 @@
 
   # Static files in the examples webapp are served by apache
   Alias /examples /vat/tomcat3/webapps/examples
-  # The following line prohibits users from directly access WEB-INF
-  
-  AllowOverride None
-  deny from 

Re: svn commit: r544037 - in /tomcat/connectors/trunk/jk/xdocs: reference/apache.xml webserver_howto/apache.xml

2007-06-03 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
> Author: markt
> Date: Sun Jun  3 20:22:01 2007
> New Revision: 544037
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=544037
> Log:
> A better warning for the httpd docs.

As per Bill's suggestion, I have improved the warning I added a couple
of days ago.

The jk guru's may wish to check this. I did test the configurations
but I am no jk or https expert so there may well be some nuance's of
mod_jk / hpptd that I have overlooked.

Mark

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



Bug report for Tomcat 3 [2007/06/03]

2007-06-03 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 2350|Ver|Nor|2001-06-27|ServletConfig.getInitParameter() requires url-patt|
| 5331|Ass|Nor|2001-12-09|getPathInfo vs URL normalization  |
| 6027|Inf|Maj|2002-01-25|Tomcat  Automatically shuts down as service   |
| 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c|
| 7785|Inf|Blk|2002-04-06|tomcat bug in context reloading   |
| 7863|Inf|Maj|2002-04-09|I have a problem when running Tomcat with IIS |
| 8187|Inf|Cri|2002-04-17|Errors when Tomcat used with MS Access database   |
| 9737|Ver|Nor|2002-06-10|ArrayIndexOutOfBoundsException when sending just p|
|10047|Ass|Cri|2002-06-20|IllegalStateException |
|10406|Ass|Cri|2002-07-02|IllegalStateException |
|11087|Inf|Blk|2002-07-23|IllegalStateException |
|12156|Inf|Cri|2002-08-29|Apache and Tomcat 3.3.1 Interworking problem  |
|16363|Ass|Cri|2003-01-23|Stack Overflow accessing compiled JSP - Tomcat 3.2|
|39250|Inf|Cri|2006-04-07|Tomcat 3.2.1 + JDK 1.4|
+-+---+---+--+--+
| Total   14 bugs   |
+---+

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



Bug report for Tomcat 4 [2007/06/03]

2007-06-03 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 3839|Opn|Enh|2001-09-26|Problem bookmarking login page|
| 4227|Opn|Enh|2001-10-17|Invalid CGI path  |
| 5329|New|Enh|2001-12-08|NT Service exits startup before Tomcat is finished|
| 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob|
| 5829|New|Enh|2002-01-13|StandardManager needs to cope with sessions throwi|
| 5985|New|Enh|2002-01-23|Tomcat should perform a more restrictive validatio|
| 6600|Opn|Enh|2002-02-20|enodeURL adds 'jsession' when 'isRequestedSessionI|
| 6614|New|Enh|2002-02-21|Have Bootstrap and StandardClassLoader use the sam|
| 6671|New|Enh|2002-02-25|Simple custom tag example uses old declaration sty|
| 7043|New|Enh|2002-03-12|database user and password for JDBC Based Store   |
| 7374|New|Enh|2002-03-22|Apache Tomcat/4.0.1 message on standard output|
| 7676|New|Enh|2002-04-02|Allow name property to use match experssions in  without className in server.xml produces N|
|11069|Opn|Enh|2002-07-23|Tomcat not flag error if tld is outside of /WEB-IN|
|11129|New|Enh|2002-07-24|New valve for putting the sessionIDs in the reques|
|11248|New|Enh|2002-07-29|DefaultServlet doesn't send expires header|
|11754|Opn|Enh|2002-08-15|Synchronous shutdown script - shutdown.sh should w|
|12069|New|Enh|2002-08-27|Creation of more HttpSession objects for one previ|
|12428|Opn|Enh|2002-09-09|request.getUserPrincipal(): Misinterpretation of s|
|12658|New|Enh|2002-09-15|a proxy host and port at the  element level |
|12766|New|Enh|2002-09-18|Tomcat should use tld files in /WEB-INF/ over vers|
|13309|Opn|Enh|2002-10-04|Catalina calls System.exit()  |
|13634|New|Enh|2002-10-15|Allowing system properties to be substituted in co|
|13689|Opn|Enh|2002-10-16|Classloader paths for 'Common' classes and librari|
|13731|New|Enh|2002-10-17|Final request, response, session and other variabl|
|13941|New|Enh|2002-10-24|reload is VERY slow   |
|13965|New|Enh|2002-10-25|Catalina.sh correction request for Tru64 Unix |
|14097|New|Enh|2002-10-30|hardcoded registry value for vm lets tomcat servic|
|14416|New|Enh|2002-11-10|blank tag name in TLD cause NullPointerException  |
|14635|New|Enh|2002-11-18|Should be possible not to have -MM-DD in log f|
|14766|New|Enh|2002-11-22|Redirect Vavle|
|14993|New|Enh|2002-12-02|Possible obselete synchronized declaration|
|15115|New|Enh|2002-12-05|correct docs... XML parser *cannot* be overridden |
|15417|Opn|Enh|2002-12-16|Add port for forced compilation of JSP pages  |
|15688|New|Enh|2002-12-27|full-qualified names instead of imports   |
|15941|New|Enh|2003-01-10|Expose rootCause exceptions at deeper levels  |
|16294|New|Enh|2003-01-21|Configurable URL Decoding.|
|16357|New|Enh|2003-01-23|"connection timeout reached"  |
|16531|New|Enh|2003-01-29|Updating already deployed ".war" files in a single|
|16579|New|Enh|2003-01-30|documentation page layout/style breaks wrapping to|
|16596|New|Enh|2003-01-30|option for disabling log rotation |
|17070|New|Enh|2003-02-14|The Catalina Ant tasks do not allow for 'reusable'|
|17146|New|Enh|2003-02-18|Simplify build.xml using 

Bug report for Watchdog [2007/06/03]

2007-06-03 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  278|Unc|Nor|2000-12-04|Bug in GetParameterValuesTestServlet.java file Bug|
|  279|Unc|Nor|2000-12-04|Logical Error in GetParameterValuesTestServlet Bug|
|  469|Unc|Nor|2001-01-17|in example-taglib.tld "urn" should be "uri" BugRat|
|  470|Unc|Nor|2001-01-17|FAIL positiveForward.jsp and positiveInclude.jsp B|
| 9634|New|Enh|2002-06-05|No tests exist for ServletContext.getResourcePaths|
|10703|New|Enh|2002-07-11|Need to test getRequestURI after RequestDispatcher|
|11336|New|Enh|2002-07-31|Test wrapped path methods with RD.foward()|
|11663|New|Maj|2002-08-13|JSP precompile tests rely on Jasper specific behav|
|11664|New|Maj|2002-08-13|A sweep is needed of all Watchdog 4.0 tag librarie|
|11665|New|Maj|2002-08-13|ServletToJSPErrorPageTest and ServletToServletErro|
|11666|New|Maj|2002-08-13|SetBufferSize_1TestServlet is invalid.|
|14004|New|Maj|2002-10-28|Incorrent behaviour of all attribute-related lifec|
|15504|New|Nor|2002-12-18|JSP positiveGetValues test relies on order preserv|
|24649|New|Nor|2003-11-12|getRemoteHost fails when agent has uppercase chara|
|29398|New|Nor|2004-06-04|Update site and note current status   |
+-+---+---+--+--+
| Total   15 bugs   |
+---+

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



Bug report for Tomcat 5 [2007/06/03]

2007-06-03 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 2500|Opn|Min|2001-07-08|FileNotFoundException from service() unintentional|
|27122|Opn|Enh|2004-02-20|IE plugins cannot access components through Tomcat|
|28039|Opn|Enh|2004-03-30|Cluster Support for SingleSignOn  |
|29160|Ver|Enh|2004-05-23|precompile problem: _jspx_meth_* (javax.servlet.js|
|29494|Inf|Enh|2004-06-10|No way to set PATH when running as a service on Wi|
|30241|Ver|Enh|2004-07-21|Enhance build script to use branch argument when c|
|33262|Inf|Enh|2005-01-27|Service Manager autostart should check for adminis|
|33453|Opn|Enh|2005-02-08|Jasper should recompile JSP files whose datestamps|
|33650|Inf|Enh|2005-02-19|Jasper performance for multiple files processing  |
|33671|Opn|Enh|2005-02-21|Manual Windows service installation with custom na|
|34801|New|Enh|2005-05-08|PATCH: CGIServlet does not terminate child after a|
|34805|Ass|Enh|2005-05-08|warn about invalid security constraint url pattern|
|34868|Ass|Enh|2005-05-11|allow to register a trust store for a session that|
|35054|Inf|Enh|2005-05-25|warn if appBase is not existing as a File or direc|
|35869|Inf|Enh|2005-07-26|Can't run as a service on Windows Server 2003 64-B|
|35941|Opn|Cri|2005-07-30|Wrong remote IP reported when using AJP and APR   |
|36121|Opn|Maj|2005-08-10|Including JSP's changes working directory |
|36133|Inf|Enh|2005-08-10|Support JSS SSL implementation|
|36169|New|Enh|2005-08-12|[PATCH] Enable chunked encoding for IIS JK connect|
|36362|New|Enh|2005-08-25|missing check for Java reserved keywords in tag fi|
|36540|Inf|Enh|2005-09-07|pooled cluster replication does not seem ensure sy|
|36569|Inf|Enh|2005-09-09|Redirects produce illegal URL's   |
|36837|Inf|Enh|2005-09-28|Looking for ProxyHandler implementation of Http re|
|36922|Inf|Enh|2005-10-04|setup.sh file mis-advertised and missing  |
|36923|New|Nor|2005-10-05|Deactivated EL expressions are not parsed for jsp |
|37018|Ass|Enh|2005-10-11|Document how to use tomcat-SSL with a pkcs11 token|
|37072|Ass|Nor|2005-10-13|Encoding mismatch in error condition  |
|37084|Opn|   |2005-10-14|JspC from ant fails on JSPs that use custom taglib|
|37326|Ass|Nor|2005-11-01|No error reported when  has non-exist|
|37334|Inf|Enh|2005-11-02|Realm digest property not aligned with the adminis|
|37449|Opn|Enh|2005-11-10|Two UserDatabaseRealm break manager user  |
|37485|Inf|Enh|2005-11-14|I'd like to run init SQL after JDBC Connection cre|
|37498|Inf|Nor|2005-11-14|[PATCH] NPE in org.apache.catalina.core.ContainerB|
|37515|Inf|Nor|2005-11-15|smap not generated by JspC when used from Ant for |
|37627|Opn|Nor|2005-11-24|Slow and incomplete dynamic content generation aft|
|37785|Inf|Nor|2005-12-05|Changing startup type via Tomcat Monitor does not |
|37794|Opn|Nor|2005-12-05|getParameter() fails on POST with transfer-encodin|
|37797|Inf|Maj|2005-12-05|Configure Tomcat utility truncates classpath to 96|
|37822|Opn|Nor|2005-12-07|WebappClassLoader interfering with Catalina core c|
|37834|Ass|Nor|2005-12-08|compressableMimeTypes not working properly|
|37847|Ass|Enh|2005-12-09|Allow User To Optionally Specify Catalina Output F|
|37869|Opn|Nor|2005-12-12|Cannot obtain client certificate with SSL / client|
|37918|Inf|Nor|2005-12-15|EL cannot find valid getter from object when using|
|37984|New|Nor|2005-12-21|JNDIRealm.java not able to handle MD5 password|
|38001|Inf|Nor|2005-12-22|TruncatedClassFile when loadind applets   |
|38046|Ass|   |2005-12-27|apache-tomcat-5.5.14-deployer doesn't work (Illega|
|38131|Inf|Enh|2006-01-05|WatchedResource does not work if app is outside "w|
|38216|Inf|Enh|2006-01-10|Extend Jmxproxy to allow call of MBean Operations |
|38268|Inf|Enh|2006-01-13|User friendly: Need submit button on adding/deleti|
|38290|Inf|Nor|2006-01-16|No SESSION_DESTROYED_EVENT sent for existing webap|
|38291|Inf|Nor|2006-01-16|Form actions hanging in UDecoder.convert  |
|38352|Inf|Nor|2006-

DO NOT REPLY [Bug 42573] New: - mod_jk 1.2.23 transfer data corrupted

2007-06-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=42573

   Summary: mod_jk 1.2.23 transfer data corrupted
   Product: Tomcat 5
   Version: 5.0.20
  Platform: PC
OS/Version: Windows Server 2003
Status: NEW
  Severity: major
  Priority: P2
 Component: Native:JK
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have to use a iis6 + jboss4.0.5(tomcat 5.5.20) to serve our web site(both with
jsp and asp). The mod_jk is 1.2.23(isapi_redirect.dll) and the normal html file
looks fine. 
I have some privilege restricted image files that i should send with the
servlet(response.write...) after the privilege check had be done. So, i use the
ServletOutputStream to write image file's byte array to the remote browser. But
i find the image file transfered by the jk oftentimes corrupted(error occurs
about 10%). I test this servlet file download on http connector 8080 and this
kind of data error has never been shown. When the file size is 100K-200K, this
error is more easy to re-produce on my windows machine and the server log
nothing exceptions or errors.

private void writeFileToResponse(FileInputStream fi, HttpServletResponse
response, Attachment af, int filelength)
throws IOException {
String ContentType = af.getMime();

int C_BUFSIZE = 1024*32;
byte[] buf = new byte[C_BUFSIZE];

   
response.setContentType((ContentType==null)?"application/octstream":ContentType);
response.setContentLength(filelength);
response.setHeader("Content-Disposition", "inline; filename=" + fname );
ServletOutputStream bout = response.getOutputStream();
try {
int i = 0;
while((i = fi.read(buf)) > 0) {
// if the user leave, then break the loop
   bout.write(buf, 0, i);
}
bout.flush();
} catch(IOException ioe) {
//  write to the client error or read file error, but do not log
anything
}
finally {
//bout.close();
}

}

-- 
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]