DO NOT REPLY [Bug 43893] - WebDAV servlet returns incorrect values for the "href" property

2007-11-20 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=43893


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|major   |normal




--- Additional Comments From [EMAIL PROTECTED]  2007-11-20 00:09 ---
Hello Mark, thanks for looking into this.

You are absolutely right, it does work fine when the servlet is mapped with /*, 
it only fails with / mapping. The reason I used / is because I do want the 
redirects to be generated, but I can use /* as a workaround for now, thanks!

I'm surprised though that you can't reproduce it with the / mapping. I can 
reliably reproduce it here every time, I just tried again to make sure, here is 
a transcript of the steps:



C:\>set CATALINA_HOME=c:\apache-tomcat-6.0.14

C:\>copy webdav.war %CATALINA_HOME%\webapps
1 file(s) copied.

C:\>%CATALINA_HOME%\bin\catalina.bat start
Using CATALINA_BASE:   c:\apache-tomcat-6.0.14
Using CATALINA_HOME:   c:\apache-tomcat-6.0.14
Using CATALINA_TMPDIR: c:\apache-tomcat-6.0.14\temp
Using JRE_HOME:c:\Java\jdk-1.6.0

C:\>nc localhost 8080
PROPFIND /webdav/file.txt HTTP/1.1
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/3.0
Host: localhost:8080
Depth: 0

HTTP/1.1 207 Multi-Status
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Content-Length: 732
Date: Tue, 20 Nov 2007 07:45:33 GMT


/webdav/file.txt/file.txt
2007-11-18T07:42:14Z

Sun, 18 Nov 2007 07:42:14 GMT
0
text/plain
W/"0-1195371734000"



HTTP/1.1 200 OK





That "nc" command above is netcat from Cygwin, which I have in the PATH.

Even though the attached patch turned out to be too naive, it does show the 
exact line in the code where I observed the path duplication with a debugger, 
when WebdavServlet is mapped to / url prefix.


-- 
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 43893] - WebDAV servlet returns incorrect values for the "href" property

2007-11-20 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=43893


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #21144|0   |1
is obsolete||




-- 
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 43914] - HTTP spec violation when generating HTTP redirects for folders without trailing slash

2007-11-20 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=43914





--- Additional Comments From [EMAIL PROTECTED]  2007-11-20 05:57 ---
Created an attachment (id=21161)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21161&action=view)
simple fix

I have no idea what the preferred internal Tomcat method for encoding URLs is,
I just copied the URLEncoder stuff from DefaultServlet.


-- 
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 43914] New: - HTTP spec violation when generating HTTP redirects for folders without trailing slash

2007-11-20 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=43914

   Summary: HTTP spec violation when generating HTTP redirects for
folders without trailing slash
   Product: Tomcat 6
   Version: 6.0.14
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Copy the attached static.war into $CATALINA_HOME/webapps. Then start the server 
and paste this HTTP request in netcat:

GET /static/name%20with%20spaces HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.0
Host: localhost:8080

Tomcat will answer with the following HTTP redirect:

HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://localhost:8080/static/name with spaces/
Transfer-Encoding: chunked
Date: Tue, 20 Nov 2007 13:46:12 GMT

Observe the Location: header. It has raw unencoded spaces in the URL which is 
in clear violation of the HTTP specification.

-- 
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 43914] - HTTP spec violation when generating HTTP redirects for folders without trailing slash

2007-11-20 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=43914





--- Additional Comments From [EMAIL PROTECTED]  2007-11-20 05:54 ---
Created an attachment (id=21160)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21160&action=view)
minimal webapp that demonstrates the problem


-- 
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 43893] - WebDAV servlet returns incorrect values for the "href" property

2007-11-20 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=43893





--- Additional Comments From [EMAIL PROTECTED]  2007-11-20 06:45 ---
(In reply to comment #3)
> The patch you suggests breaks the ability to have different urls for editing 
and
> viewing by mapping to /edit/* or similar.

For what its worth, I've since discovered that the patch also broke even basic 
functionality, like deleting files with the Microsoft Web Folders client, so it 
was definitely wrong.


-- 
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 43893] - WebdavServlet returns incorrect values for the "href" property when it is mapped with / url prefix, instead of /*

2007-11-20 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=43893


[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|WebDAV servlet returns  |WebdavServlet returns
   |incorrect values for the|incorrect values for the
   |"href" property |"href" property when it is
   ||mapped with / url prefix,
   ||instead of /*




-- 
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 43872] - getMethod() always returns "GET"

2007-11-20 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=43872





--- Additional Comments From [EMAIL PROTECTED]  2007-11-20 06:52 ---
The same behavous is with Tomcat 6.0.14
I'm sure I miss something but I can't findout what.



-- 
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: r596746 - in /tomcat/connectors/trunk/jk: native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c native/common/jk_util.c native/common/jk_util.h xdocs/miscellaneous/changelog.xml

2007-11-20 Thread rjung
Author: rjung
Date: Tue Nov 20 09:23:39 2007
New Revision: 596746

URL: http://svn.apache.org/viewvc?rev=596746&view=rev
Log:
bugzilla 43873: Fix small memory leak occuring during httpd restart.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=596746&r1=596745&r2=596746&view=diff
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Nov 20 09:23:39 
2007
@@ -2944,6 +2944,7 @@
 if (conf->uw_map)
 uri_worker_map_free(&conf->uw_map, NULL);
 }
+jk_free_time_fmt(conf->log);
 conf->was_initialized = JK_FALSE;
 }
 s = s->next;

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=596746&r1=596745&r2=596746&view=diff
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Nov 20 09:23:39 
2007
@@ -2330,6 +2330,7 @@
 if (conf->uw_map)
 uri_worker_map_free(&conf->uw_map, NULL);
 }
+jk_free_time_fmt(conf->log);
 conf->was_initialized = JK_FALSE;
 }
 s = s->next;
@@ -2534,8 +2535,11 @@
 {
 /* [EMAIL PROTECTED] */
 /* Clean up pointer content */
-if (d != NULL)
-*(jk_logger_t **)d = NULL;
+if (d != NULL) {
+jk_logger_t *l = *(jk_logger_t **)d;
+jk_free_time_fmt(l);
+l = NULL;
+}
 
 return APR_SUCCESS;
 }

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=596746&r1=596745&r2=596746&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Tue Nov 20 09:23:39 2007
@@ -410,6 +410,15 @@
 }
 }
 
+void jk_free_time_fmt(jk_logger_t *l)
+{
+if (l && l->log_fmt_subsec &&
+l->log_fmt != l->log_fmt_subsec) {
+free((void *)l->log_fmt_subsec);
+l->log_fmt_subsec = l->log_fmt;
+}
+}
+
 static int set_time_str(char *str, int len, jk_logger_t *l)
 {
 time_t t;

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.h?rev=596746&r1=596745&r2=596746&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.h Tue Nov 20 09:23:39 2007
@@ -41,6 +41,8 @@
 
 void jk_set_time_fmt(jk_logger_t *l, const char *jk_log_fmt);
 
+void jk_free_time_fmt(jk_logger_t *l);
+
 int jk_parse_log_level(const char *level);
 
 int jk_open_file_logger(jk_logger_t **l, const char *file, int level);

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=596746&r1=596745&r2=596746&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Nov 20 
09:23:39 2007
@@ -43,6 +43,9 @@
   
   
 
+  
+43873: Fix small memory leak occuring during httpd restart. 
(rjung)
+  
   
 Common: Allow '*' for the worker name in exclusion rules (resp. 
JkUnMount)
 which will override all workers. (rjung)



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



svn commit: r596747 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-11-20 Thread rjung
Author: rjung
Date: Tue Nov 20 09:29:26 2007
New Revision: 596747

URL: http://svn.apache.org/viewvc?rev=596747&view=rev
Log:
Add comments to explain timestamp formatting for sub seconds resolution.

Furthermore increased the accepted format length a bit.
Before we accepted JK_TIME_MAX_SIZE=64 bytes after replacing
the first subsecond format character, now we accept the same size
before replacing the formatting character.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=596747&r1=596746&r2=596747&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Tue Nov 20 09:29:26 2007
@@ -124,7 +124,7 @@
 /*
  * define the log format, we're using by default the one from error.log
  *
- * [Mon Mar 26 19:44:48 2001] [jk_uri_worker_map.c (155)]: Into 
jk_uri_worker_map_t::uri_worker_map_alloc
+ * [Mon Mar 26 19:44:48.123 2001] [jk_uri_worker_map.c (155)]: Into 
jk_uri_worker_map_t::uri_worker_map_alloc
  * log format used by apache in error.log
  */
 #define JK_TIME_CONV_MILLI"%Q"
@@ -137,7 +137,17 @@
 #define JK_TIME_SUBSEC_NONE   (0)
 #define JK_TIME_SUBSEC_MILLI  (1)
 #define JK_TIME_SUBSEC_MICRO  (2)
-#define JK_TIME_MAX_SIZE  (64)
+/* The size of the longest format string we can handle,
+ * including the terminating '\0'.
+ */
+#define JK_TIME_MAX_FMT_SIZE  (64)
+/* We increase the maximum format string size by the biggest
+ * size increment, that happens during replacement of a
+ * sub second format character by it's zero digit string.
+ * At the moment, this is
+ * strlen(JK_TIME_PATTERN_MICRO)-strlen(JK_TIME_CONV_MICRO) = 6-2 = 4.
+ */
+#define JK_TIME_MAX_SIZE  (JK_TIME_MAX_FMT_SIZE + 4)
 
 /* Visual C++ Toolkit 2003 support */
 #if defined (_MSC_VER) && (_MSC_VER == 1310)
@@ -353,11 +363,21 @@
 #endif
 }
 
+/* Replace the first occurence of a sub second time format character
+ * by a series of zero digits with the right precision.
+ * We format our timestamp with strftime, but this can not handle
+ * sub second timestamps.
+ * So we first patch the milliseconds or microseconds literally into
+ * the format string, and then pass it on the strftime.
+ * In order to do that efficiently, we prepare a format string, that
+ * already has placeholder digits for the sub second time stamp
+ * and we save the position and resultion of this placeholder.
+ */
 void jk_set_time_fmt(jk_logger_t *l, const char *jk_log_fmt)
 {
 if (l) {
 char *s;
-char log_fmt_safe[JK_TIME_MAX_SIZE];
+char log_fmt_safe[JK_TIME_MAX_FMT_SIZE];
 char *fmt;
 
 if (!jk_log_fmt) {
@@ -373,35 +393,57 @@
 l->log_fmt_subsec = jk_log_fmt;
 l->log_fmt = jk_log_fmt;
 
-fmt = (char *)malloc(JK_TIME_MAX_SIZE + strlen(JK_TIME_PATTERN_MICRO));
+/* This has enough space for JK_TIME_MAX_FMT_SIZE chars plus the longest
+ * sub second replacement we might do in the format string.
+ */
+fmt = (char *)malloc(JK_TIME_MAX_SIZE);
 if (fmt) {
-strncpy(log_fmt_safe, jk_log_fmt, JK_TIME_MAX_SIZE);
+/* Ignore all chars in format string after position JK_TIME_MAX_FMT_SIZE.
+ * This is simply for truncating the jk_log_fmt input param without
+ * destroying the original.
+ */
+strncpy(log_fmt_safe, jk_log_fmt, JK_TIME_MAX_FMT_SIZE);
+log_fmt_safe[JK_TIME_MAX_FMT_SIZE-1] = '\0';
 if ((s = strstr(log_fmt_safe, JK_TIME_CONV_MILLI))) {
+/* We will replace the first occurence of JK_TIME_CONV_MILLI by 
JK_TIME_PATTERN_MILLI. */
 size_t offset = s - log_fmt_safe;
 size_t len = strlen(JK_TIME_PATTERN_MILLI);
 
 l->log_fmt_type = JK_TIME_SUBSEC_MILLI;
 l->log_fmt_offset = offset;
+/* fmt has enough space for the truncated original format string plus
+ * replacement of JK_TIME_CONV_MILLI by JK_TIME_PATTERN_MILLI. */
 strncpy(fmt, log_fmt_safe, offset);
 strncpy(fmt + offset, JK_TIME_PATTERN_MILLI, len);
 strncpy(fmt + offset + len,
 s + strlen(JK_TIME_CONV_MILLI),
 JK_TIME_MAX_SIZE - offset - len);
+/* Now we put a stop mark into fmt to make it's length at most 
JK_TIME_MAX_SIZE-1
+ * plus terminating '\0'. This should not be necessary, because we already 
terminated
+ * log_fmt_safe, but it makes the code more robust.
+ */
 fmt[JK_TIME_MAX_SIZE-1] = '\0';
 l->log_fmt_subsec = fmt;
 l->log_fmt_size = strlen(fmt);
 }
 else if ((s = strstr(log_fmt_safe, JK_TIME_CONV_MICRO))) {
+/* We will replace the first occurence of JK_TIME_CONV_MICRO by 
JK_TIME_PATTERN_MICRO. */
 size_t offset 

DO NOT REPLY [Bug 43873] - mod_jk memory leak when apache graceful restart

2007-11-20 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=43873


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-11-20 09:34 ---
Thanks for reporting. The leak has been fixed in r596746 (in a slightly
different way, because I don't want to expose the internals of timestamp
formatting to the web server).

Mladens comments about the complicated size handling led to another revision
r596747.

Even without r596747 there was no buffer overflow issue, because the longer
string was truncated with '\0' before it was used in the shorter context.

The changes will be part of version 1.2.26, which we expect to release soon.
There will be a testing tarball before, with an announcement via the dev list.


-- 
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: r596747 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-11-20 Thread Mladen Turk

Rainer Jung wrote:


But I'm open. If we remove the const, we also need to remove it for the 
log_fmt (got as compiler warning also there, but don't have the line 
number at hand).


Which would you prefer? Do you see a problem with the const, like wrong 
compiler optimization or so?




Yes, that's a problem. Something const should never be fed to a free.
I don't see a problem if we have an char[] for each of them and
simply do a strncpy instead having duality for the same thing.

Regards,
Mladen

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



Re: svn commit: r596747 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-11-20 Thread Mladen Turk

Mladen Turk wrote:

Rainer Jung wrote:


But I'm open. If we remove the const, we also need to remove it for 
the log_fmt (got as compiler warning also there, but don't have the 
line number at hand).


Which would you prefer? Do you see a problem with the const, like 
wrong compiler optimization or so?




Yes, that's a problem. Something const should never be fed to a free.
I don't see a problem if we have an char[] for each of them and
simply do a strncpy instead having duality for the same thing.



The other solution is to have a char* and always call free.
When we need to assign const char* we call strdup("foo")

Regards,
Mladen

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



Re: svn commit: r596747 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-11-20 Thread Rainer Jung

Mladen Turk wrote:

[EMAIL PROTECTED] wrote:

Author: rjung
Date: Tue Nov 20 09:29:26 2007
New Revision: 596747

URL: http://svn.apache.org/viewvc?rev=596747&view=rev
Log:
Add comments to explain timestamp formatting for sub seconds resolution.

Furthermore increased the accepted format length a bit.
Before we accepted JK_TIME_MAX_SIZE=64 bytes after replacing
the first subsecond format character, now we accept the same size
before replacing the formatting character.

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



Hmm, you still have

const char * log_fmt_subsec
...
char *fmt = malloc( ...)
...
l->log_fmt_subsec = fmt;
...
free(l->log_fmt_subsec)

That's not good.

Why don't you declare
char log_fmt_subsec[SOME_MAX_SIZE] instead having it as const char* ?


I wasn't sure about which way is better. The const char doesn't say the 
pointer is const, but we don't change the contents of the string. And in 
fact once we assign the pointer to log_fmt_subsec (and the same for 
log_fmt), we don't change it - except when calling free, where we 
immediately replace the pointer by another const char afterwards. So 
somehow the semantics of const char* are still there (and in fact we 
don't want to change the string as long as we use it).


But I'm open. If we remove the const, we also need to remove it for the 
log_fmt (got as compiler warning also there, but don't have the line 
number at hand).


Which would you prefer? Do you see a problem with the const, like wrong 
compiler optimization or so?



Regards,
Mladen


Regards,

Rainer

P.S.: You win the prize for the fastest reviewer :)

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



Re: svn commit: r596747 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-11-20 Thread Mladen Turk

[EMAIL PROTECTED] wrote:

Author: rjung
Date: Tue Nov 20 09:29:26 2007
New Revision: 596747

URL: http://svn.apache.org/viewvc?rev=596747&view=rev
Log:
Add comments to explain timestamp formatting for sub seconds resolution.

Furthermore increased the accepted format length a bit.
Before we accepted JK_TIME_MAX_SIZE=64 bytes after replacing
the first subsecond format character, now we accept the same size
before replacing the formatting character.

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



Hmm, you still have

const char * log_fmt_subsec
...
char *fmt = malloc( ...)
...
l->log_fmt_subsec = fmt;
...
free(l->log_fmt_subsec)

That's not good.

Why don't you declare
char log_fmt_subsec[SOME_MAX_SIZE] instead having it as const char* ?

Regards,
Mladen

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



svn commit: r596761 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/catalina/startup/ java/org/apache/tomcat/util/net/ res/

2007-11-20 Thread jim
Author: jim
Date: Tue Nov 20 10:19:00 2007
New Revision: 596761

URL: http://svn.apache.org/viewvc?rev=596761&view=rev
Log:
Fix BZ 43588 - hard coded 127.0.0.1 for localhost

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
tomcat/tc6.0.x/trunk/res/tomcat.nsi

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=596761&r1=596760&r2=596761&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 20 10:19:00 2007
@@ -26,11 +26,6 @@
   [ New proposals should be added at the end of the list ]
 
 
-* Fix BZ 43588 - hard coded 127.0.0.1 for localhost
-  http://people.apache.org/~jim/patches/tc-localhost.txt
-  +1: jim, pero, fhanik
-  -1: 
-
 * Add tests for the cookie parsing.
   http://people.apache.org/~jfclere/patches/test_cookies.patch
   +1: jfclere

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java?rev=596761&r1=596760&r2=596761&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java Tue 
Nov 20 10:19:00 2007
@@ -372,7 +372,7 @@
 try {
 serverSocket =
 new ServerSocket(port, 1,
- InetAddress.getByName("127.0.0.1"));
+ 
InetAddress.getByName("localhost").getHostAddress());
 } catch (IOException e) {
 log.error("StandardServer.await: create[" + port
+ "]: ", e);

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java?rev=596761&r1=596760&r2=596761&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java Tue Nov 
20 10:19:00 2007
@@ -24,6 +24,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.net.InetAddress;
 import java.net.Socket;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -416,7 +417,8 @@
 
 // Stop the existing server
 try {
-Socket socket = new Socket("127.0.0.1", server.getPort());
+String hostAddress = 
InetAddress.getByName("localhost").getHostAddress();
+Socket socket = new Socket(hostAddress, server.getPort());
 OutputStream stream = socket.getOutputStream();
 String shutdown = server.getShutdown();
 for (int i = 0; i < shutdown.length(); i++)

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue 
Nov 20 10:19:00 2007
@@ -858,7 +858,7 @@
 try {
 // Need to create a connection to unlock the accept();
 if (address == null) {
-s = new java.net.Socket("127.0.0.1", port);
+s = new 
java.net.Socket(InetAddress.getByName("localhost").getHostAddress(), port);
 } else {
 s = new java.net.Socket(address, port);
 // setting soLinger to a small value will help shutdown the

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java Tue 
Nov 20 10:19:00 2007
@@ -3

Re: svn commit: r596761 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/catalina/startup/ java/org/apache/tomcat/util/net/ res/

2007-11-20 Thread Mladen Turk

[EMAIL PROTECTED] wrote:

Author: jim

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue 
Nov 20 10:19:00 2007
@@ -858,7 +858,7 @@
 try {
 // Need to create a connection to unlock the accept();
 if (address == null) {
-s = new java.net.Socket("127.0.0.1", port);
+s = new 
java.net.Socket(InetAddress.getByName("localhost").getHostAddress(), port);


Although fine related to the localhost address, this will need to get changed.
The problem is with IPV6 cause in case the bind address is IPV6 the
unlock should be "s = new java.net.Socket("::1", port);"
On some platforms APR doesn't listen on IPV4 and IPV6 like FreeBSD and Windows.

It's not something related to this patch but something related to the
concept itself.
The best approach for unlock IMO would be to use the actual bind address,
but again there is a problem with NULL for IPV4/IPV6 and the fact that
we'd need to figure out the IP for each of them (localhost).

Regards,
Mladen

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



[EMAIL PROTECTED]: Project tomcat-tc6 (in module tomcat-tc6) failed

2007-11-20 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project tomcat-tc6 has an issue affecting its community integration.
This issue affects 26 projects,
 and has been outstanding for 236 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- antbook-diary-core :  Examples to go with Java Development with Ant
- antbook-sections :  Examples to go with Java Development with Ant
- cddlm :  Configuration and Deployment of Grid Applications and System...
- commons-transaction :  Commons Identifier Package
- commons-vfs :  Apache Commons
- commons-vfs-sandbox :  Apache Commons
- excalibur-fortress-bean :  Repository of reusable components.
- excalibur-fortress-container-impl :  Repository of reusable components.
- excalibur-fortress-container-test :  Repository of reusable components.
- excalibur-fortress-examples :  Repository of reusable components.
- excalibur-fortress-migration :  Repository of reusable components.
- excalibur-fortress-platform :  Repository of reusable components.
- excalibur-fortress-testcase :  Repository of reusable components.
- excalibur-monitor :  Repository of reusable components.
- excalibur-sourceresolve :  Repository of reusable components.
- excalibur-xmlutil :  Repository of reusable components.
- ivy :  Ivy Core
- ivy-tests :  Ivy is a tool for managing (recording, tracking, resolving 
a...
- slide-webdavclient :  Content Management System based on WebDAV technology
- smartfrog :  Smartfrog: Application Deployment from HP Laboratories
- smartfrog-components :  Smartfrog: Application Deployment from HP 
Laboratories
- smartfrog-tasks :  Smartfrog: Application Deployment from HP Laboratories
- smartfrog-tasks-test :  Smartfrog: Application Deployment from HP 
Laboratories
- smartfrog-test :  Smartfrog: Application Deployment from HP Laboratories
- smartfrog-testharness :  Smartfrog: Application Deployment from HP 
Laboratories
- tomcat-tc6 :  Java Servlet 2.5 & Server Pages JSP 2.1 implementation (for 
...


Full details are available at:
http://vmgump.apache.org/gump/public/tomcat-tc6/tomcat-tc6/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.jsvc.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-tc6/tomcat-tc6/gump_work/build_tomcat-tc6_tomcat-tc6.html
Work Name: build_tomcat-tc6_tomcat-tc6 (Type: Build)
Work ended in a state of : Failed
Elapsed: 38 secs
Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/tomcat-tc6/BUILDING.txt 
-Dcommons-daemon.jsvc.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/jsvc.tar.gz
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20112007.jar
 
-Djasper-jdt.jar=/srv/gump/packages/eclipse-3.1M6/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar
 
-Dcommons-logging-api.jar=/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20112007.jar
 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-tc6/tomcat-deps/tomcat-jdbc-20112007.jar
 
[Working Directory: /srv/gump/public/workspace/tomcat-tc6]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/tomcat-tc6/output/classes:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/junit/dist/junit-20112007.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20112007.jar:/srv/gump/packages/eclipse-3.1M6/plugins/org.eclipse.jdt.core_3.
 
1.0/jdtcore.jar:/srv/gump/public/workspace/tomcat-tc6/tomcat-deps/tomcat-jdbc-20112007.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/co

svn commit: r596813 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c common/jk_logger.h common/jk_util.c common/jk_util.h

2007-11-20 Thread rjung
Author: rjung
Date: Tue Nov 20 12:29:28 2007
New Revision: 596813

URL: http://svn.apache.org/viewvc?rev=596813&view=rev
Log:
Because of some changed indentations, this one is easier to read in full text,
not as a diff :(

1) Still use static length format string for subsecond resolution time
   stamp formats, otherwise we would have to allocate a corresponding
   buffer dynamically for each log line.
   In case sub second precision is used, we only allow a format string
   of JK_TIME_MAX_SIZE-1=63 characters after replacement of subsecond
   format character by the respective digit sequence.
   Without subsecond resolution we still allow longer format strings.
2) Since the length of the sub second format string is restricted,
   use static length for the char array log_fmt_subsec
3) Since everything is static length, we have no more dynamic allocation.
   Remove jk_free_time_fmt() and revert r596746.
4) Make length checks during strncpy more explicit.
5) Move logging of used log time stamp format into the util method.
   The logger is completely initialized at the time we call this
   method.


Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
tomcat/connectors/trunk/jk/native/common/jk_logger.h
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=596813&r1=596812&r2=596813&view=diff
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Nov 20 12:29:28 
2007
@@ -2458,14 +2458,12 @@
 if (jkl && flp) {
 jkl->log = jk_log_to_file;
 jkl->level = conf->log_level;
-jk_set_time_fmt(jkl, conf->stamp_format_string);
 jkl->logger_private = flp;
 flp->log_fd = conf->log_fd;
 conf->log = jkl;
+jk_set_time_fmt(conf->log, conf->stamp_format_string);
 if (main_log == NULL)
 main_log = conf->log;
-jk_log(conf->log, JK_LOG_DEBUG, "log time stamp format is '%s'",
-   conf->log->log_fmt);
 return;
 }
 
@@ -2944,7 +2942,6 @@
 if (conf->uw_map)
 uri_worker_map_free(&conf->uw_map, NULL);
 }
-jk_free_time_fmt(conf->log);
 conf->was_initialized = JK_FALSE;
 }
 s = s->next;

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=596813&r1=596812&r2=596813&view=diff
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Nov 20 12:29:28 
2007
@@ -2330,7 +2330,6 @@
 if (conf->uw_map)
 uri_worker_map_free(&conf->uw_map, NULL);
 }
-jk_free_time_fmt(conf->log);
 conf->was_initialized = JK_FALSE;
 }
 s = s->next;
@@ -2535,11 +2534,8 @@
 {
 /* [EMAIL PROTECTED] */
 /* Clean up pointer content */
-if (d != NULL) {
-jk_logger_t *l = *(jk_logger_t **)d;
-jk_free_time_fmt(l);
-l = NULL;
-}
+if (d != NULL)
+*(jk_logger_t **)d = NULL;
 
 return APR_SUCCESS;
 }
@@ -2608,10 +2604,10 @@
 if (jkl && flp) {
 jkl->log = jk_log_to_file;
 jkl->level = conf->log_level;
-jk_set_time_fmt(jkl, conf->stamp_format_string);
 jkl->logger_private = flp;
 flp->jklogfp = conf->jklogfp;
 conf->log = jkl;
+jk_set_time_fmt(conf->log, conf->stamp_format_string);
 if (main_log == NULL) {
 main_log = conf->log;
 
@@ -2620,8 +2616,6 @@
 /* Also should we pass pointer (ie: main_log) or handle 
(*main_log) ? */
 apr_pool_cleanup_register(p, &main_log, jklog_cleanup, 
jklog_cleanup);
 }
-jk_log(conf->log, JK_LOG_DEBUG, "log time stamp format is '%s'",
-   conf->log->log_fmt);
 
 return 0;
 }

Modified: tomcat/connectors/trunk/jk/native/common/jk_logger.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_logger.h?rev=596813&r1=596812&r2=596813&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_logger.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_logger.h Tue Nov 20 12:29:28 
2007
@@ -31,17 +31,19 @@
 {
 #endif
 
+#define JK_TIME_MAX_SIZE (64)
+
 typedef struct jk_logger jk_logger_t;
 struct jk_logger
 {
 void *logger_private;
 int level;
-const char *log_fmt;  

Re: svn commit: r596747 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-11-20 Thread Rainer Jung

Mladen Turk wrote:

Mladen Turk wrote:

Rainer Jung wrote:


But I'm open. If we remove the const, we also need to remove it for 
the log_fmt (got as compiler warning also there, but don't have the 
line number at hand).


Which would you prefer? Do you see a problem with the const, like 
wrong compiler optimization or so?




Yes, that's a problem. Something const should never be fed to a free.
I don't see a problem if we have an char[] for each of them and
simply do a strncpy instead having duality for the same thing.



The other solution is to have a char* and always call free.
When we need to assign const char* we call strdup("foo")

Regards,
Mladen


OK, I use a const char* for log_fmt, because I can take that one simply 
from Apache, and a char[] of fixed max size for log_fmt_subsec, because 
we need to make changes to that one. Now the code doesn't do any more 
malloc(), because I can copy directly to the char[], so the free() is 
gone to.


Have a look, if you find the latest commit understandable.

Regards,

Rainer

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



Questions about sometime slowness of tomcat

2007-11-20 Thread Jun Zhang
Hi,

I really do not know which mail alias is the correct one to post this
topic. So I send it to all.

I am developing a web application using Tomcat, which uses a servlet to
handle the request, which includes geting data from database and writing
the data back to the client to display. When I restart the tomcat and
begin this process, then the time would be 750ms for one request to get
response. However when the client sends the request after the tomcat
finish some requests, then the time would become about 200ms.

I do not know why. I have exclude the affect of database. You know I do
not know the working mechanism of tomcat. So if someone here could help
me explain why and if there is some way to avoid it.

Thanks a lot,

Jun


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



svn commit: r596865 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java

2007-11-20 Thread fhanik
Author: fhanik
Date: Tue Nov 20 14:53:59 2007
New Revision: 596865

URL: http://svn.apache.org/viewvc?rev=596865&view=rev
Log:
Fix compilation error

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java?rev=596865&r1=596864&r2=596865&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java Tue 
Nov 20 14:53:59 2007
@@ -372,7 +372,7 @@
 try {
 serverSocket =
 new ServerSocket(port, 1,
- 
InetAddress.getByName("localhost").getHostAddress());
+ InetAddress.getByName("localhost"));
 } catch (IOException e) {
 log.error("StandardServer.await: create[" + port
+ "]: ", e);



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



DO NOT REPLY [Bug 43872] - getMethod() always returns "GET"

2007-11-20 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=43872


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2007-11-20 15:06 ---
(In reply to comment #1)
> The same behavous is with Tomcat 6.0.14
> I'm sure I miss something but I can't findout what.

Yes, you are missing something. You form's action points to "/lele", but this 
URL is a directory, so Tomcat issues a HTTP redirect to the correct directory 
path "/lele/".

Most browsers will follow a HTTP redirect with a GET request, even if the 
original form submission was POST.

To fix your example, just set your form action to "/lele/" or "/lele/
index.html" so your servlet gets accessed directly without any redirects, and 
you will see the doPost() method and the form parameters.


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



Tomcat Monitor Configuration

2007-11-20 Thread RafaQuiM

Hello,

I'm having problems using the TomcatMonitor (tomcat4w.exe) when trying to
access a WinXp net file from a Servlet due to the console uses the SYTEM
user (user.name property) as credentials.

Does anybody know how to configure tomcatMonitor in order to use the logged
user?

I've tried changing parameters in Log tag but no success.

any hint would be appreciated.

thanks in advance
-- 
View this message in context: 
http://www.nabble.com/Tomcat-Monitor-Configuration-tf4847276.html#a13868811
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


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



Re: Tomcat Monitor Configuration

2007-11-20 Thread Mladen Turk

RafaQuiM wrote:

Hello,

I'm having problems using the TomcatMonitor (tomcat4w.exe) when trying to
access a WinXp net file from a Servlet due to the console uses the SYTEM
user (user.name property) as credentials.

Does anybody know how to configure tomcatMonitor in order to use the logged
user?

I've tried changing parameters in Log tag but no success.



Those are only for running detached java.exe.
Change the logon properties directly in Services control panel
for the Tomcat service.

BTW, this is dev list. You should use user list for
such questions.

Regards,
Mladen

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