Re: svn commit: r378588 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

2006-02-17 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: mturk
Date: Fri Feb 17 10:52:26 2006
New Revision: 378588

URL: http://svn.apache.org/viewcvs?rev=378588&view=rev
Log:
When APR_HAS_SENDFILE is disabled always return false no mater what user set in 
the config.


In init(), there is:

// Sendfile usage on systems which don't support it cause major 
problems

if (useSendfile && !Library.APR_HAS_SENDFILE) {
log.warn(sm.getString("endpoint.sendfile.nosupport"));
useSendfile = false;
}

Isn't this code doing anything ? I'd prefer not to add any logic hidden 
in JavaBean gets/sets.


Rémy

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



svn commit: r378621 - in /tomcat/container/tc5.5.x/webapps: host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java manager/WEB-INF/classes/org/apache/catalina/manager/Constants.ja

2006-02-17 Thread remm
Author: remm
Date: Fri Feb 17 12:36:01 2006
New Revision: 378621

URL: http://svn.apache.org/viewcvs?rev=378621&view=rev
Log:
- Fix logos.

Modified:

tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java

tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java

Modified: 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java?rev=378621&r1=378620&r2=378621&view=diff
==
--- 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java
 (original)
+++ 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java
 Fri Feb 17 12:36:01 2006
@@ -106,11 +106,11 @@
 "\n" +
 " \n" +
 "  \n" +
-"   http://jakarta.apache.org/\";>\n" +
-"\n" +
+"   http://www.apache.org/\";>\n" +
+"\n" +
 "   \n" +
-"   http://jakarta.apache.org/tomcat/\";>\n" +
+"   http://tomcat.apache.org/\";>\n" +
 "\n" +
 "   \n" +

Modified: 
tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java?rev=378621&r1=378620&r2=378621&view=diff
==
--- 
tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
 (original)
+++ 
tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
 Fri Feb 17 12:36:01 2006
@@ -102,11 +102,11 @@
 "\n" +
 " \n" +
 "  \n" +
-"   http://jakarta.apache.org/\";>\n" +
-"\n" +
+"   http://www.apache.org/\";>\n" +
+"\n" +
 "   \n" +
-"   http://jakarta.apache.org/tomcat/\";>\n" +
+"   http://tomcat.apache.org/\";>\n" +
 "\n" +
 "   \n" +



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



DO NOT REPLY [Bug 38697] - tomcat native calls apr_socket_sendfile even when routine doesn't exist

2006-02-17 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=38697


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-17 19:54 ---
Fixed in the SVN.
See:
http://svn.apache.org/viewcvs?rev=378588&view=rev
and
http://svn.apache.org/viewcvs?rev=378586&view=rev

Thanks for spotting that.

-- 
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: r378588 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

2006-02-17 Thread mturk
Author: mturk
Date: Fri Feb 17 10:52:26 2006
New Revision: 378588

URL: http://svn.apache.org/viewcvs?rev=378588&view=rev
Log:
When APR_HAS_SENDFILE is disabled always return false no mater what user set in 
the config.

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378588&r1=378587&r2=378588&view=diff
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
Fri Feb 17 10:52:26 2006
@@ -306,9 +306,9 @@
 /**
  * Use endfile for sending static files.
  */
-protected boolean useSendfile = Library.APR_HAS_SENDFILE;
+protected boolean useSendfile = true;
 public void setUseSendfile(boolean useSendfile) { this.useSendfile = 
useSendfile; }
-public boolean getUseSendfile() { return useSendfile; }
+public boolean getUseSendfile() { return Library.APR_HAS_SENDFILE ? 
useSendfile : false; }
 
 
 /**



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



svn commit: r378586 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

2006-02-17 Thread mturk
Author: mturk
Date: Fri Feb 17 10:46:47 2006
New Revision: 378586

URL: http://svn.apache.org/viewcvs?rev=378586&view=rev
Log:
Use Library.APR_HAS_SENDFILE as default value for sendfile flag.

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378586&r1=378585&r2=378586&view=diff
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
Fri Feb 17 10:46:47 2006
@@ -306,7 +306,7 @@
 /**
  * Use endfile for sending static files.
  */
-protected boolean useSendfile = true;
+protected boolean useSendfile = Library.APR_HAS_SENDFILE;
 public void setUseSendfile(boolean useSendfile) { this.useSendfile = 
useSendfile; }
 public boolean getUseSendfile() { return useSendfile; }
 



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



DO NOT REPLY [Bug 38697] New: - tomcat native calls apr_socket_sendfile even when routine doesn't exist

2006-02-17 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=38697

   Summary: tomcat native calls apr_socket_sendfile even when
routine doesn't exist
   Product: Tomcat 5
   Version: Nightly Build
  Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
  Severity: critical
  Priority: P2
 Component: Native:Integration
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The apr_socket_sendfile routine does not exist on all platforms. 
APR_HAS_SENDFILE is set to 0 in these 
cases. The tomcat native support does not respect this flag, and tries to call 
the sendfile routine anyway, 
resulting in a crash at runtime.

This occurs, for instance, on Mac OS X 10.4 Tiger, where the underlying 
sendfile routine is not 
implemented.

Perhaps there's a way to back away from using sendfile if the routine doesn't 
exist, while still allowing the 
rest of apr support?

-- 
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 38630] - Environment (java:comp/env/) sometimes not available

2006-02-17 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=38630





--- Additional Comments From [EMAIL PROTECTED]  2006-02-17 18:02 ---
I also disagree with you that environment entries should be only available when
the context listener is called. If the classes of the webapp are loaded before
that, all environment entries configured in server.xml and the webapp's
deployment descriptor .xml file should be available, because that's what they
are for: customizing and configuring the running webapp. 

In the J2EE spec and the Servlet spec you can read that the environment entries
have to be available to the application at _runtime_. Static initializers also
belong to the application's runtime.

BTW: it worked in tomcat 4.1, but is broken in 5.5.9 (the one embedded in
NetBeans 5.0), too.


-- 
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 38484] - webapps Admin: Invalid path /login was requested

2006-02-17 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=38484





--- Additional Comments From [EMAIL PROTECTED]  2006-02-17 14:53 ---
Same failure occures also under Debian Sarge!!!

-- 
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: r378499 - /tomcat/connectors/trunk/jni/native/src/error.c

2006-02-17 Thread mturk
Author: mturk
Date: Fri Feb 17 04:48:32 2006
New Revision: 378499

URL: http://svn.apache.org/viewcvs?rev=378499&view=rev
Log:
Check only for our custom messages, and leave to APR to deal with others.

Modified:
tomcat/connectors/trunk/jni/native/src/error.c

Modified: tomcat/connectors/trunk/jni/native/src/error.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378499&r1=378498&r2=378499&view=diff
==
--- tomcat/connectors/trunk/jni/native/src/error.c (original)
+++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:48:32 2006
@@ -135,9 +135,6 @@
 err -= TCN_TIMEUP;
 jerr = AJP_TO_JSTRING(tcn_errors[err + 1]);
 }
-else if (err > TCN_ETIMEDOUT) {
-jerr = AJP_TO_JSTRING(tcn_errors[0]);
-}
 else {
 apr_strerror(err, serr, 512);
 jerr = AJP_TO_JSTRING(serr);



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



svn commit: r378498 - in /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net: AprEndpoint.java res/LocalStrings.properties

2006-02-17 Thread remm
Author: remm
Date: Fri Feb 17 04:47:40 2006
New Revision: 378498

URL: http://svn.apache.org/viewcvs?rev=378498&view=rev
Log:
- Update error reports, including the error codes (just in case we get a MS 
style "Unknown error").

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378498&r1=378497&r2=378498&view=diff
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
Fri Feb 17 04:47:40 2006
@@ -538,12 +538,12 @@
 // Bind the server socket
 int ret = Socket.bind(serverSock, inetAddress);
 if (ret != 0) {
-throw new Exception(sm.getString("endpoint.init.bind", 
Error.strerror(ret)));
+throw new Exception(sm.getString("endpoint.init.bind", "" + ret, 
Error.strerror(ret)));
 }
 // Start listening on the server socket
 ret = Socket.listen(serverSock, backlog);
 if (ret != 0) {
-throw new Exception(sm.getString("endpoint.init.listen", 
Error.strerror(ret)));
+throw new Exception(sm.getString("endpoint.init.listen", "" + ret, 
Error.strerror(ret)));
 }
 if (OS.IS_WIN32 || OS.IS_WIN64) {
 // On Windows set the reuseaddr flag after the bind/listen
@@ -1079,7 +1079,11 @@
 } else if (rv < 0) {
 /* Any non timeup error is critical */
 if (-rv != Status.TIMEUP) {
-log.error(sm.getString("endpoint.poll.fail", 
Error.strerror(-rv)));
+int errn = -rv;
+if (errn >  Status.APR_OS_START_USERERR) {
+   errn -=  Status.APR_OS_START_USERERR;
+}
+log.error(sm.getString("endpoint.poll.fail", "" + 
(-rv), Error.strerror(-rv)));
 // Handle poll critical failure
 synchronized (this) {
 destroy();
@@ -1411,7 +1415,7 @@
 sendfileData.put(new Long(data.socket), 
data);
 sendfileCount++;
 } else {
-
log.warn(sm.getString("endpoint.sendfile.addfail", Error.strerror(rv)));
+
log.warn(sm.getString("endpoint.sendfile.addfail", "" + rv, 
Error.strerror(rv)));
 // Can't do anything: close the socket 
right away
 Socket.destroy(data.socket);
 }
@@ -1471,7 +1475,7 @@
 if (-rv == Status.TIMEUP)
 rv = 0;
 else {
-log.error(sm.getString("endpoint.poll.fail", 
Error.strerror(-rv)));
+log.error(sm.getString("endpoint.poll.fail", "" + 
(-rv), Error.strerror(-rv)));
 // Handle poll critical failure
 synchronized (this) {
 destroy();

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=378498&r1=378497&r2=378498&view=diff
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
 (original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
 Fri Feb 17 04:47:40 2006
@@ -11,14 +11,14 @@
 endpoint.debug.unlock=Caught exception trying to unlock accept on port {0}
 endpoint.err.close=Caught exception trying to close socket
 endpoint.noProcessor=No Processors - worker thread dead!
-endpoint.init.bind=Socket bind failed: {0}
-endpoint.init.listen=Socket listen failed: {0}
 
+endpoint.init.bind=Socket bind failed: [{0}] {1}
+endpoint.init.listen=Socket listen failed: [{0}] {1}
 endpoint.accept.fail=Socket accept failed
 endpoint.poll.limitedpollsize=Failed to create poller with specified size, 
uses 62 instead
 endpoint.poll.initfail=Poller creation failed
-endpoint.poll.fail=Critical poller failure ({0}), restarting poller
+endpoint.poll.fail=Critical poller failure (restarting poller): [{0}] {1}
 endpoint.poll.error=Unexpected poller error
 endpoint.sen

svn commit: r378496 - /tomcat/connectors/trunk/jni/native/src/error.c

2006-02-17 Thread mturk
Author: mturk
Date: Fri Feb 17 04:31:18 2006
New Revision: 378496

URL: http://svn.apache.org/viewcvs?rev=378496&view=rev
Log:
Fix the typo.

Modified:
tomcat/connectors/trunk/jni/native/src/error.c

Modified: tomcat/connectors/trunk/jni/native/src/error.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378496&r1=378495&r2=378496&view=diff
==
--- tomcat/connectors/trunk/jni/native/src/error.c (original)
+++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:31:18 2006
@@ -22,7 +22,7 @@
 #include "tcn.h"
 
 static const char *tcn_errors[] = {
-"Unknow user error",
+"Unknown user error",
 /* TCN_TIMEUP  */   "Operation timed out",
 /* TCN_EAGAIN  */   "There is no data ready",
 /* TCN_EINTR   */   "Interrupted system call",



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



svn commit: r378495 - /tomcat/connectors/trunk/jni/native/src/error.c

2006-02-17 Thread mturk
Author: mturk
Date: Fri Feb 17 04:24:44 2006
New Revision: 378495

URL: http://svn.apache.org/viewcvs?rev=378495&view=rev
Log:
Report unknown errors.

Modified:
tomcat/connectors/trunk/jni/native/src/error.c

Modified: tomcat/connectors/trunk/jni/native/src/error.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378495&r1=378494&r2=378495&view=diff
==
--- tomcat/connectors/trunk/jni/native/src/error.c (original)
+++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:24:44 2006
@@ -22,13 +22,13 @@
 #include "tcn.h"
 
 static const char *tcn_errors[] = {
-"Unknown user error",
+"Unknow user error",
 /* TCN_TIMEUP  */   "Operation timed out",
 /* TCN_EAGAIN  */   "There is no data ready",
 /* TCN_EINTR   */   "Interrupted system call",
-/* TCN_EINPROGRESS */   "Operation in prrogress",
+/* TCN_EINPROGRESS */   "Operation in progress",
 /* TCN_ETIMEDOUT   */   "Connection timed out",
-NULL,
+NULL
 };
 
 /* Merge IS_ETIMEDOUT with APR_TIMEUP
@@ -133,7 +133,10 @@
 UNREFERENCED(o);
 if (err >= TCN_TIMEUP && err <= TCN_ETIMEDOUT) {
 err -= TCN_TIMEUP;
-jerr = AJP_TO_JSTRING(tcn_errors[err]);
+jerr = AJP_TO_JSTRING(tcn_errors[err + 1]);
+}
+else if (err > TCN_ETIMEDOUT) {
+jerr = AJP_TO_JSTRING(tcn_errors[0]);
 }
 else {
 apr_strerror(err, serr, 512);



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



svn commit: r378494 - /tomcat/connectors/trunk/jni/native/src/error.c

2006-02-17 Thread mturk
Author: mturk
Date: Fri Feb 17 04:13:21 2006
New Revision: 378494

URL: http://svn.apache.org/viewcvs?rev=378494&view=rev
Log:
Add custom messages for our custom return values.
Without that the apr_strerror returns
"APR does not understand this error code."

Modified:
tomcat/connectors/trunk/jni/native/src/error.c

Modified: tomcat/connectors/trunk/jni/native/src/error.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/error.c?rev=378494&r1=378493&r2=378494&view=diff
==
--- tomcat/connectors/trunk/jni/native/src/error.c (original)
+++ tomcat/connectors/trunk/jni/native/src/error.c Fri Feb 17 04:13:21 2006
@@ -21,6 +21,16 @@
 
 #include "tcn.h"
 
+static const char *tcn_errors[] = {
+"Unknown user error",
+/* TCN_TIMEUP  */   "Operation timed out",
+/* TCN_EAGAIN  */   "There is no data ready",
+/* TCN_EINTR   */   "Interrupted system call",
+/* TCN_EINPROGRESS */   "Operation in prrogress",
+/* TCN_ETIMEDOUT   */   "Connection timed out",
+NULL,
+};
+
 /* Merge IS_ETIMEDOUT with APR_TIMEUP
  */
 #define TCN_STATUS_IS_ETIMEDOUT(x) (APR_STATUS_IS_ETIMEDOUT((x)) || ((x) == 
APR_TIMEUP))
@@ -121,9 +131,14 @@
 jstring jerr;
 
 UNREFERENCED(o);
-apr_strerror(err, serr, 512);
-
-jerr = AJP_TO_JSTRING(serr);
+if (err >= TCN_TIMEUP && err <= TCN_ETIMEDOUT) {
+err -= TCN_TIMEUP;
+jerr = AJP_TO_JSTRING(tcn_errors[err]);
+}
+else {
+apr_strerror(err, serr, 512);
+jerr = AJP_TO_JSTRING(serr);
+}
 return jerr;
 }
 



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



Re: Tomcat Connector 1.2.15 - JkOption "FlushPackets"-Bug

2006-02-17 Thread Mladen Turk

Pelikan Stephan wrote:

Hello,
 
I detected that the "FlushPackets" JkOption does not work. I could solve

the problem by the patch
 


FlushPacket works, and the patch is invalid.
The service ws_flush is invoked from ajp_common.

In theory there can be problems if there
is no content_body packets, but the flushing
is implied after the handler by apache itself.


Regards,
Mladen.

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



Tomcat Connector 1.2.15 - JkOption "FlushPackets"-Bug

2006-02-17 Thread Pelikan Stephan
Hello,
 
I detected that the "FlushPackets" JkOption does not work. I could solve
the problem by the patch
 
*** jakarta-tomcat-connectors-1.2.15-src/jk/native/apache-2.0/mod_jk.c
2005-09-21 15:59:50.0 +0200
---
jakarta-tomcat-connectors-1.2.15flushing-src/jk/native/apache-2.0/mod_jk
.c   2006-02-17 10:59:05.0 +0100
***
*** 412,417 
--- 412,420 
  jk_log(main_log, JK_LOG_DEBUG,
 "written %d out of %d", r, ll);

+ if (s->flush_packets)
+ ws_flush(s);
+
  if (r < 0)
  return JK_FALSE;
  ll -= r;

Regards, Stephan

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



Re: sendRedirect and absolute paths

2006-02-17 Thread Tino Schwarze
On Thu, Feb 16, 2006 at 03:24:52PM -0800, Casey Haakenson wrote:
> We have a customer who is hitting our web GUI through a fairly
> complicated SSH proxy scheme.  For example, when they hit a page on our
> site such as /redirect.jsp we do a
> response.sendRedirect("/newpage.jsp").  This results in a 302 status
> code and a Location header with the full URI
> (http://somesite.com/newpage.jsp) which is the incorrect URL since the
> proxy has been rewriting the URL's so far and this new one is the one
> that the proxy is hitting not the original one the browser thinks it's
> viewing.
> 
> Anyway, I have tested a change to CoyoteResponse.sendRedirect:1114 (we
> are using 4.1.24) to send the "relative absolute" ("/newpage.jsp") path
> back to the browser in the Location header.  This appears to solve the
> problem and work in all browsers I've been able to test, but am worried
> that since you guys went to so much trouble making it include the
> protocol, hostname, port, etc that this may break some odd browser or
> case I'm not fully understanding at the moment.

AFAIK it's against HTTP specs. Redirects have to be absolute. For
example, lynx complains ("redirect URL is not absolute" or something
alike). IMO there's only one practical solution: Tell your application
which URLs will be used to access it and prepare the redirect URLs
according to the request (you can evaluate X-Forwarded-Host and similar
headers to get the original hostname).

Bye, Tino.


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