svn commit: r437133 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2006-08-26 Thread mturk
Author: mturk
Date: Sat Aug 26 02:32:06 2006
New Revision: 437133

URL: http://svn.apache.org/viewvc?rev=437133&view=rev
Log:
Fix simple_rewrite for the cases where the
rewritten url is larger then the original one.

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=437133&r1=437132&r2=437133&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sat Aug 26 02:32:06 
2006
@@ -685,7 +685,7 @@
 return TRUE;
 }
 
-static void simple_rewrite(char *uri)
+static int simple_rewrite(char *uri)
 {
 if (rewrite_map) {
 int i;
@@ -696,9 +696,11 @@
 strcpy(buf, jk_map_value_at(rewrite_map, i));
 strcat(buf, uri + strlen(src));
 strcpy(uri, buf);
+return 1;
 }
 }
 }
+return 0;
 }
 
 DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
@@ -746,6 +748,7 @@
 char Host[INTERNET_MAX_URL_LENGTH] = "";
 char Port[INTERNET_MAX_URL_LENGTH] = "";
 char Translate[INTERNET_MAX_URL_LENGTH];
+char squery[INTERNET_MAX_URL_LENGTH] = "";
 BOOL(WINAPI * GetHeader)
 (struct _HTTP_FILTER_CONTEXT * pfc, LPSTR lpszName,
  LPVOID lpvBuffer, LPDWORD lpdwSize);
@@ -801,6 +804,7 @@
 query = strchr(uri, '?');
 if (query) {
 *query++ = '\0';
+strcpy(squery, query);
 }
 
 rc = unescape_url(uri);
@@ -921,15 +925,22 @@
  *
  * TODO: Add more advanced regexp rewrite.
  */
-simple_rewrite(forwardURI);
-if (JK_IS_DEBUG_LEVEL(logger))
-jk_log(logger, JK_LOG_DEBUG,
-   "rewriten URI [%s]",
-   forwardURI);
+if (JK_IS_DEBUG_LEVEL(logger)) {
+char duri[INTERNET_MAX_URL_LENGTH];
+strcpy(duri, forwardURI);
+if (simple_rewrite(forwardURI)) {
+jk_log(logger, JK_LOG_DEBUG,
+   "rewriten URI [%s]->[%s]",
+   duri, forwardURI);
+}
+}
+else {
+simple_rewrite(forwardURI);
+}
 
 if (!AddHeader(pfc, URI_HEADER_NAME, forwardURI) ||
-((query != NULL && strlen(query) > 0)
- ? !AddHeader(pfc, QUERY_HEADER_NAME, query) : FALSE) ||
+((strlen(squery) > 0)
+ ? !AddHeader(pfc, QUERY_HEADER_NAME, squery) : FALSE) ||
 !AddHeader(pfc, WORKER_HEADER_NAME, (LPSTR)worker) ||
 !SetHeader(pfc, "url", extension_uri)) {
 jk_log(logger, JK_LOG_ERROR,
@@ -963,15 +974,13 @@
 }
 memset(ld, 0, sizeof(isapi_log_data_t));
 strcpy(ld->uri, forwardURI);
-if (query && strlen(query) > 0)
-strcpy(ld->query, query);
+strcpy(ld->query, squery);
 pfc->pFilterContext = ld;
 } else {
 isapi_log_data_t *ld = (isapi_log_data_t 
*)pfc->pFilterContext;
 memset(ld, 0, sizeof(isapi_log_data_t));
 strcpy(ld->uri, forwardURI);
-if (query && strlen(query) > 0)
-strcpy(ld->query, query);
+strcpy(ld->query, squery);
 }
 }
 else {



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



svn commit: r437135 - /tomcat/connectors/trunk/jk/xdocs/changelog.xml

2006-08-26 Thread mturk
Author: mturk
Date: Sat Aug 26 02:43:31 2006
New Revision: 437135

URL: http://svn.apache.org/viewvc?rev=437135&view=rev
Log:
Comment IIS fix for simple_rewrite.

Modified:
tomcat/connectors/trunk/jk/xdocs/changelog.xml

Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=437135&r1=437134&r2=437135&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sat Aug 26 02:43:31 2006
@@ -25,6 +25,10 @@
   
   
 
+  
+  IIS: Fix simple_rewrite for the cases where the
+  rewritten url is larger then the original one. (mturk)
+  
   
   New JkOption to disable connection persistence. (jim)
   



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



Re: svn commit: r433689 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina: core/ApplicationContext.java session/StandardSession.java

2006-08-26 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Tue Aug 22 09:52:29 2006
New Revision: 433689

URL: http://svn.apache.org/viewvc?rev=433689&view=rev
Log:
Prepare for cluster integration


I like that, thanks. BTW, I thought you were planning to use a separate 
module for the source.


I think a single source tree (whenever possible) is easier (it avoids 
breaking things) as long as people are responsible about package 
interdependencies.


Rémy

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



DO NOT REPLY [Bug 40327] - Logging level now defaults to debug - crashed server

2006-08-26 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=40327


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-08-26 11:32 ---
We've already committed a fix for this on trunk. Most liekely the fix will be in
1.2.19, eventually in 1.2.20. The next release 1.2.19 will be cut soon.

A workaround is setting JkLogLevel explicitely, like you already did.

Thanks for the report.

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



Re: svn commit: r433689 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina: core/ApplicationContext.java session/StandardSession.java

2006-08-26 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Tue Aug 22 09:52:29 2006
New Revision: 433689

URL: http://svn.apache.org/viewvc?rev=433689&view=rev
Log:
Prepare for cluster integration


I like that, thanks. BTW, I thought you were planning to use a 
separate module for the source.

separate package works easier, and we become consistent across the platform.


I think a single source tree (whenever possible) is easier (it avoids 
breaking things) as long as people are responsible about package 
interdependencies.


Rémy

welcome back
Filip


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





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



DO NOT REPLY [Bug 39146] - Display JSP code !!!

2006-08-26 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=39146


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |




--- Additional Comments From [EMAIL PROTECTED]  2006-08-26 19:46 ---
I have seen this several times now.   It appears to happening when I try to
access a page just after restarting the Tomcat server.  It is not easy to
reproduce, but is a very serious bug.

Using Tomcat 5.5.17 under Fedora 5 with Firefox browser.

-- 
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 40306] - POST request bodies are not restored on successful login when using mod_jk

2006-08-26 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=40306


[EMAIL PROTECTED] changed:

   What|Removed |Added

 OS/Version|Linux   |All




--- Additional Comments From [EMAIL PROTECTED]  2006-08-27 05:14 ---
After going over this again, body.toString() wasn't returning null after all,
but the POST parameter values were still missing. I debugged the coyoteRequest
and noticed that the contentLength was equal to -1 upon entering the
restoreRequest() method of FormAuthenticator when going over the http connector
(8080). When going over AJP it was set to 0. 

This causes a problem in
org.apache.catalina.connector.Request.parseParameters(). Before attempting to to
find POST parameters, it calls org.apache.coyote.Request.getContentLength()
which doesn't look at the content-length header when the current value of
contentLength > -1. Being that the current value equals 0, no parameters were
parsed.  

At any rate, the following code fixes the problem.

org.apache.coyote.ajp.AjpAprProcessor.java (5.5.16), starting at line 579:

} else if (actionCode == ActionCode.ACTION_REQ_SET_BODY_REPLAY) {

// Reset the content length on the saved request.
request.setContentLength(-1);
// Set the given bytes as the content
ByteChunk bc = (ByteChunk) param;
bodyBytes.setBytes(bc.getBytes(), bc.getStart(), bc.getLength());
first = false;
empty = false;
replay = true;

}
 
I would greatly appreciate it if a commiter would take a look at 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 40306] - mod_jk, POST request bodies are not restored on successful login when using mod_jk

2006-08-26 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=40306


[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|POST request bodies are not |mod_jk, POST request bodies
   |restored on successful login|are not restored on
   |when using mod_jk   |successful login when using
   ||mod_jk




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