You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/02/18 00:01:28 UTC

DO NOT REPLY [Bug 46727] New: DefaultServlet - serving multiple encodings

https://issues.apache.org/bugzilla/show_bug.cgi?id=46727

           Summary: DefaultServlet - serving multiple encodings
           Product: Tomcat 6
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: ftoth@synernet.com
                CC: ftoth@synernet.com


Created an attachment (id=23272)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23272)
Minor refactor of DefaultServlet

Hi,

It had to happen sooner or later. In one of my tomcat applications I now have
to serve multiple collections of static content which may have various
encodings. We depend heavily on DefaultServlet, but in its current state it is
not possible to control encoding on a resource-by-resource basis. One can set
the "fileEncoding" parameter, but this controls all static resources.

The structure of the current code makes this impossible to solve by extending
the class, since fileEncoding is a global instance variable.

The attached refactoring mitigates this primarily by changing the method
signature of serveResource() to contain an encoding argument. The extending
class may override this method on every call if necessary.


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46727] DefaultServlet - serving multiple encodings

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46727





--- Comment #1 from Mark Thomas <ma...@apache.org>  2009-02-17 15:10:14 PST ---
Patches should be in diff -u format


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 46727] DefaultServlet - serving multiple encodings

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46727

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
          Component|Catalina                    |Catalina
            Version|unspecified                 |trunk
         Resolution|---                         |FIXED
            Product|Tomcat 6                    |Tomcat 8
   Target Milestone|default                     |----

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Sorry it has been rather a long time getting back to this.

A variation of this patch has been applied to 8.0.x and will be included in
8.0.0-RC3 onwards.

Since this patch changes the default servlet signature and it is likely that
folks have extended the default servlet, I don't think it would be a good idea
to back-port this to earlier versions of Tomcat.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46727] DefaultServlet - serving multiple encodings

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46727

Murugan <mu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |murugan.black@gmail.com

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46727] DefaultServlet - serving multiple encodings

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46727





--- Comment #2 from Fred Toth <ft...@synernet.com>  2009-02-17 15:30:12 PST ---
Created an attachment (id=23273)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23273)
DefaultServlet refactor - patch

Hi,

Resubmit as a patch.

Thanks,

Fred


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org