tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BugRat Mail System <tomcat-b...@cortexity.com>
Subject BugRat Report #657 - Tomcat's webserver doesn't create URLs properly for oddly named files.
Date Thu, 01 Feb 2001 06:05:23 GMT
Report #657 Details

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: low
Severity: non-critical
Confidence: public
Environment: 
   Release: Tomcat 3.2+
   JVM Release: Sun/HotSpot/1.3.0
   Operating System: Windows NT 4.0
   OS Release: 4.0 SP6a
   Platform: Windows

Synopsis: 
Tomcat's webserver doesn't create URLs properly for oddly named files.

Description:
While Tomcat's JSP engine handles oddly named files very well, the builtin webserver does
a poor job of creating properly formatted URLs for those files. 

For example, a JSP with filename "odd file name.jsp" should be accessed by the relative URL
"/path/odd%20file%20name.jsp". Unfortunately, when the webserver's directory indexer generates
relative URLs like this, "/path/odd file name.jsp", so that when the user follows this link,
a 404 error page is returned:

Not found (404)
Original request: /path/odd
Not found request: /paths/odd

Also, if it's an oddly named resource (html file), then the webserver can't handle the correct
URL, either. (For example, for "odd file.html", the directory indexer will generate a link
like "/path/odd file.html", which doesn't work, so I type "http://server/path/odd%20file.html"
into the location, and I get a 404:

Not found (404)
Original request: /path/odd%20file.html
Not found request: /path/odd%20file.html

Clearly, the webserver included in tomcat is not a production webserver, and tomcat is meant
to be installed into another webserver, but it is a bug none-the-less. The indexer could probobly
be fixed rather easily to generate proper directory indices, and there's a good chance that
the resource finder could be patched to handle %-escaped URLs proplerly relatively easily,
too.



Mime
View raw message