Ejemplo n.º 1
0
 protected static void SetResponseHeaders(HttpRequestWrapper request, HttpResponse response, sResponse results)
 {
     int refreshInterval;
     if (results.isStrictNoCache())
     {
         refreshInterval = 0;
     }
     else if (request.getParameter(REFRESH_PARAM) != null)
     {
         int.TryParse(request.getParameter(REFRESH_PARAM), out refreshInterval);
     }
     else
     {
         refreshInterval = Math.Max(60 * 60, (int)(results.getCacheTtl() / 1000L));
     }
     HttpUtil.SetCachingHeaders(response, refreshInterval);
     // We're skipping the content disposition header for flash due to an issue with Flash player 10
     // This does make some sites a higher value phishing target, but this can be mitigated by
     // additional referer checks.
     if (!results.getHeader("Content-Type").ToLower().Equals("application/x-shockwave-flash"))
     {
         response.AddHeader("Content-Disposition", "attachment;filename=p.txt");
     }
 }