[Mono-bugs] [Bug 485557] New: Response.ClearHeaders reset HttpCacheability to private

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 16 06:40:40 EDT 2009


https://bugzilla.novell.com/show_bug.cgi?id=485557


           Summary: Response.ClearHeaders reset HttpCacheability to
                    private
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: informatique.internet at fiducial.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.9.0.7)
Gecko/2009021906 Firefox/3.0.7

On MS.NET 1.1 if you call Response.ClearHeaders, it will reset
Response.Cache.SetCacheability to default : HttpCacheability.Private

On mono 2.4 (svn branch) it does not

IMPORTANT : Response.Clear() doesn't reset Cacheability settings only
ClearHeaders()

Reproducible: Always

Steps to Reproduce:
1. try this inline aspx
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>testcache</title>
    <script language="CS" runat="server">
        void Page_Load(object sender, System.EventArgs e) 
           {
              // Put user code to initialize the page here 
              Console.WriteLine("Page_Load");
              Response.Cache.SetCacheability(HttpCacheability.NoCache);
              if (Request.QueryString["private"]!=null) {
                  Console.WriteLine("Setting Private");
                  Response.Cache.SetCacheability(HttpCacheability.Private);
              }

            lbl1.Text="coucou";
            if (Request.QueryString["clear"]!=null) {
                Response.Clear();
                Response.End();
            }
            if (Request.QueryString["clearheaders"]!=null) {
                Response.ClearHeaders();
                Response.End();
            }
        } 
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Label id="lbl1" runat="server">Label</asp:Label>
    </form>
</body>
</html>

2.GET "http://localhost:8080/testcache.aspx?clearheaders=true" -e

Actual Results:  
Cache-Control: no-cache
Connection: close
Date: Mon, 16 Mar 2009 10:27:55 GMT
Pragma: no-cache
Server: Mono.WebServer/0.1.0.0 Unix
Content-Length: 0
Content-Type: text/html; charset=utf-8
Expires: -1
Client-Date: Mon, 16 Mar 2009 10:27:55 GMT
Client-Peer: 127.0.0.1:8080
Client-Response-Num: 1
Set-Cookie: ASPSESSION=86230015CA6C545D3E9E1BEC; path=/
X-AspNet-Version: 1.1.4322



Expected Results:  
Cache-Control: private
Connection: close
Date: Mon, 16 Mar 2009 10:27:55 GMT
Server: Mono.WebServer/0.1.0.0 Unix
Content-Length: 0
Client-Date: Mon, 16 Mar 2009 10:27:55 GMT
Client-Peer: 127.0.0.1:8080
Client-Response-Num: 1
X-AspNet-Version: 1.1.4322

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list