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 2012/01/24 16:41:10 UTC

DO NOT REPLY [Bug 52517] New: Server affecting URLConnector's defaultUseCache settings

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

             Bug #: 52517
           Summary: Server affecting URLConnector's defaultUseCache
                    settings
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kamil.toszek@gmail.com
    Classification: Unclassified


After migrating to Tomcat 6 (from Tomcat 5), connections made by servlets using
URLConnection have additional request headers -> "Cache-Control"and "Pragma".

After looking at the OpenJDK6 implementation of URLConnection class, in 
private void writeRequests() function I have found this lines:
if(!getUseCaches())
{
   requests.setIfNotSet("Cache-Control", "no-cache");
   requests.setIfNotSet("Pragma", "no-cache");
}

Now, urlconnection.getDefaultUseCaches on Tomcat 5 returns null, but on Tomcat
6 the same code returns false, thus Tomcat 6 affects behavior of Java Runtime
Environment.

-- 
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 52517] Server affecting URLConnector's defaultUseCache settings

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX
         OS/Version|                            |All

--- Comment #1 from Mark Thomas <ma...@apache.org> 2012-01-29 19:14:46 UTC ---
This is by design to avoid memory leaks.

The behaviour is configurable. See the docs for
org.apache.catalina.core.JreMemoryLeakPreventionListener

You are also able to change this per connection.

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