DO NOT REPLY [Bug 46131] New: for a root context getContextPath returns "/" after a forward

2008-10-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46131

   Summary: for a root context getContextPath returns "/" after a
forward
   Product: Tomcat 6
   Version: 6.0.18
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Servlet & JSP API
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Javadoc for HttpServletRequest#getContextPath() says:
For servlets in the default (root) context, this method returns ""

As long as i do no forward Tomcat does it right.
However, when forwarding via a Filter to another resource the result of
getContextPath() changes from "" to "/".

Small demo code:

public class TestFilter implements Filter {
 public void doFilter(ServletRequest req, ServletResponse resp, FilterChain
chain) {
  String path = ((HttpServletRequest)req).getContextPath();
  System.out.println("Filter context path:" + path);
  //prints ""

  RequestDispatcher disp = req.getRequestDispatcher("/testservlet");
  disp.forward(request, response);
  }
  ...
}

public class TestServlet extends HttpServlet {
 public void service(ServletRequest req, ServletResponse res) {
  String path = ((HttpServletRequest)req).getContextPath();
  System.out.println("Servlet context path:" + path);
  //prints "" but when coming from filter prints "/"
 }
}

Small issue but i've had big problems when using JSF (myfaces) and
UrlRewriteFilter for a root context application.
As long as no rewriterule matches, JSF generates URLs like "/path/to/file.jsf"
which the browser interprets as "http://www.myhost.com/path/to/file.jsf";.
But when a rewriterule matches (and a  forward is processed)
JSF generates URLs like "//path/to/file.jsf" which the browser interprets as
"http://path/to/file.jsf";

My workaround:
A HttpServletRequestWrapper which overrides getContextPath()
public String getContextPath() {
 return "/".equals(super.getContextPath()) ? "" : super.getContextPath();
}


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 46125] Setting large cookies in the request causes Tomcat to abort the connection

2008-10-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46125





--- Comment #2 from Matt Bishop <[EMAIL PROTECTED]>  2008-10-30 10:42:30 PST ---
The safari error is actually kCFErrorDomainCFNetwork error 302.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: [VOTE] Release build 4.1.38

2008-10-30 Thread Mark Thomas
Mark Thomas wrote:
> Mark Thomas wrote:
>> The source tarball and other packages are available here:
>> http://tomcat.apache.org/dev/dist/apache-tomcat-4.1.38/
>>
>> According to the release process, the 4.1.38 tag is:
>> [X] Broken
>> [ ] Alpha
>> [ ] Beta
>> [ ] Stable

I am changing my vote to Broken and cancelling this release after finding a
nasty regression with the port for 44494. Differences in the CoyoteAdaptor
in 4.1.x meant that configuring URIEncoding="..." completely breaks Tomcat.
This only affects 4.1.x.

I'll have this fixed and 4.1.39 ready to roll shortly.

Mark



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



svn commit: r709267 - /tomcat/current/tc4.1.x/STATUS.txt

2008-10-30 Thread markt
Author: markt
Date: Thu Oct 30 15:29:00 2008
New Revision: 709267

URL: http://svn.apache.org/viewvc?rev=709267&view=rev
Log:
Propose fix for 44494 regression

Modified:
tomcat/current/tc4.1.x/STATUS.txt

Modified: tomcat/current/tc4.1.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc4.1.x/STATUS.txt?rev=709267&r1=709266&r2=709267&view=diff
==
--- tomcat/current/tc4.1.x/STATUS.txt (original)
+++ tomcat/current/tc4.1.x/STATUS.txt Thu Oct 30 15:29:00 2008
@@ -25,3 +25,9 @@
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
+
+* Fix regression in previous fix for bug 44494
+  This aligns the CoyoteAdaptor code in 4.1.x with that in 5.5.x and 6.0.x
+  http://people.apache.org/~markt/patches/2008-10-30-bug44494-regression.patch
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 46116] Characters that has incompatible character convertion between Unicode and DBCS causes HTTP404

2008-10-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46116


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID




--- Comment #2 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-30 15:42:28 PST ---
I have done some testing just to confirm this and providing that the same
encoding is used throughout (I used UTF-8) then the RLO (U+202e) character does
not cause any problems.

If your file system uses one encoding and the URLs another then this is never
going to work unless you provide some code (probably a modified default
servlet) to do the translation.

Finally, if you want to use UTF-8 in your URL you need to add
URIEncoding="UTF-8" to your connector.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 46126] Unable to compile class for JSP

2008-10-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46126


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-30 15:46:10 PST ---


*** This bug has been marked as a duplicate of bug 42475 ***


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 42475] JSP Compliation error when the page <@includes a page with a variable named org and then performs a

2008-10-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=42475


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #3 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-30 15:46:10 PST ---
*** Bug 46126 has been marked as a duplicate of this bug. ***


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 36911] Make fails while building jsvc on mac os x, multiple errors

2008-10-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=36911


Christopher Hunt <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Comment #4 from Christopher Hunt <[EMAIL PROTECTED]>  2008-10-30 16:03:49 
PST ---
This issue is not resolved.

While the workaround has been identified there has been no application of it to
the distribution.

Additionally there are now a number of other warnings that I feel should be
recognised. Here is the log from my build on Mac OS X. Firstly here is the
configure output:

*** Current host ***
checking build system type... i386-apple-darwin9.5.0
checking host system type... i386-apple-darwin9.5.0
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking for javac... /Library/Java/Home/bin/javac
checking wether the Java compiler (/Library/Java/Home/bin/javac) works... yes
checking for jar... /Library/Java/Home/bin/jar
gcc flags added
*** Writing output files ***
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makedefs
config.status: creating native/Makefile
*** All done ***
Now you can issue "make"

...and here is the output of make (given the identified bool modification of
jsvc.h):

make -C native all
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c arguments.c -o arguments.o
arguments.c: In function ‘arguments’:
arguments.c:251: warning: unused variable ‘temp’
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c debug.c -o debug.o
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c dso-dlfcn.c -o dso-dlfcn.o
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c dso-dyld.c -o dso-dyld.o
dso-dyld.c: In function ‘multiple’:
dso-dyld.c:34: warning: ‘NSNameOfSymbol’ is deprecated (declared at
/usr/include/mach-o/dyld.h:187)
dso-dyld.c:34: warning: ‘NSNameOfModule’ is deprecated (declared at
/usr/include/mach-o/dyld.h:158)
dso-dyld.c:34: warning: ‘NSNameOfModule’ is deprecated (declared at
/usr/include/mach-o/dyld.h:158)
dso-dyld.c:35: warning: ‘NSNameOfModule’ is deprecated (declared at
/usr/include/mach-o/dyld.h:158)
dso-dyld.c: In function ‘dso_init’:
dso-dyld.c:61: warning: ‘NSInstallLinkEditErrorHandlers’ is deprecated
(declared at /usr/include/mach-o/dyld.h:226)
dso-dyld.c: In function ‘dso_link’:
dso-dyld.c:69: warning: ‘NSAddLibrary’ is deprecated (declared at
/usr/include/mach-o/dyld.h:228)
dso-dyld.c: In function ‘dso_symbol’:
dso-dyld.c:109: warning: operation on ‘x’ may be undefined
dso-dyld.c:113: warning: ‘NSLookupAndBindSymbol’ is deprecated (declared at
/usr/include/mach-o/dyld.h:179)
dso-dyld.c:118: warning: ‘NSModuleForSymbol’ is deprecated (declared at
/usr/include/mach-o/dyld.h:189)
dso-dyld.c:119: warning: ‘NSAddressOfSymbol’ is deprecated (declared at
/usr/include/mach-o/dyld.h:188)
dso-dyld.c:121: warning: ‘NSNameOfSymbol’ is deprecated (declared at
/usr/include/mach-o/dyld.h:187)
dso-dyld.c:121: warning: ‘NSNameOfModule’ is deprecated (declared at
/usr/include/mach-o/dyld.h:158)
dso-dyld.c: At top level:
dso-dyld.c:127: warning: function declaration isn’t a prototype
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c help.c -o help.o
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c home.c -o home.o
gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\"i386\"
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall
-Wstrict-prototypes -c java.c -o java.o
java.c:49: warning: function declaration isn’t a prototype
java.c: In function

svn commit: r709294 - /tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java

2008-10-30 Thread markt
Author: markt
Date: Thu Oct 30 16:46:41 2008
New Revision: 709294

URL: http://svn.apache.org/viewvc?rev=709294&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46105
Correctly set URI encoding when replaying request after FORM auth

Modified:
tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java

Modified: 
tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java?rev=709294&r1=709293&r2=709294&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 
Thu Oct 30 16:46:41 2008
@@ -426,7 +426,9 @@
 }
 
 request.getCoyoteRequest().getParameters().recycle();
-
+request.getCoyoteRequest().getParameters().setQueryStringEncoding(
+request.getConnector().getURIEncoding());
+
 if ("POST".equalsIgnoreCase(saved.getMethod())) {
 ByteChunk body = saved.getBody();
 



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



svn commit: r709297 - /tomcat/current/tc5.5.x/STATUS.txt

2008-10-30 Thread markt
Author: markt
Date: Thu Oct 30 16:54:09 2008
New Revision: 709297

URL: http://svn.apache.org/viewvc?rev=709297&view=rev
Log: (empty)

Modified:
tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=709297&r1=709296&r2=709297&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Thu Oct 30 16:54:09 2008
@@ -130,3 +130,9 @@
   http://svn.apache.org/viewvc?rev=696408&view=rev
   +1: mark
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46105
+  Correctly set URI encoding when replaying a request after FORM auth
+  http://svn.apache.org/viewvc?rev=709294&view=rev
+  +1: markt
+  -1: 



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



svn commit: r709296 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-10-30 Thread markt
Author: markt
Date: Thu Oct 30 16:53:40 2008
New Revision: 709296

URL: http://svn.apache.org/viewvc?rev=709296&view=rev
Log:
Propose fix for 46105

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=709296&r1=709295&r2=709296&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct 30 16:53:40 2008
@@ -233,3 +233,8 @@
   +1: fhanik
   -1: 
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46105
+  Correctly set URI encoding when replaying a request after FORM auth
+  http://svn.apache.org/viewvc?rev=709294&view=rev
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 46105] URIEncoding doesn't affect after form-authentication redirect

2008-10-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46105





--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-30 16:54:52 PST ---
This has been fixed in trunk and proposed for 5.5.x and 6.0.x


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



.exe installer installs some /src files in 5.5.27, 4.1.38 (candidate)

2008-10-30 Thread Konstantin Kolinko
Running apache-tomcat-4.1.38.exe (the RC version proposed for voting)
with default options (changing nothing in the dialog) installs some files
into ${catalina.home}/src/

e.g.
/src/connectors/coyote/src/conf/MANIFEST.MF

Running apache-tomcat-5.5.27.exe also installs some
/src/connectors/
/src/container/

The TC 6.0.18 installer is not affected, it does not install
such files. Also, *.zip distributions do not include them.

Is that by design? It looks like a bug to me.


Best regards,
Konstantin Kolinko

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



svn commit: r709340 - /tomcat/current/tc4.1.x/STATUS.txt

2008-10-30 Thread rjung
Author: rjung
Date: Thu Oct 30 21:10:22 2008
New Revision: 709340

URL: http://svn.apache.org/viewvc?rev=709340&view=rev
Log:
Vote.

Modified:
tomcat/current/tc4.1.x/STATUS.txt

Modified: tomcat/current/tc4.1.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc4.1.x/STATUS.txt?rev=709340&r1=709339&r2=709340&view=diff
==
--- tomcat/current/tc4.1.x/STATUS.txt (original)
+++ tomcat/current/tc4.1.x/STATUS.txt Thu Oct 30 21:10:22 2008
@@ -29,5 +29,5 @@
 * Fix regression in previous fix for bug 44494
   This aligns the CoyoteAdaptor code in 4.1.x with that in 5.5.x and 6.0.x
   http://people.apache.org/~markt/patches/2008-10-30-bug44494-regression.patch
-  +1: markt
+  +1: markt, rjung
   -1: 



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