Esempio n. 1
0
 /// <summary>
 /// Sets the Last-Modified entity header field, if it has not
 /// already been set and if the value is meaningful.  Called before
 /// doGet, to ensure that headers are set before response data is
 /// written.  A subclass might have set this header already, so we
 /// check.
 /// </summary>
 /// <param name="resp"></param>
 /// <param name="lastModified"></param>
 private void MaybeSetLastModified(IHttpServletResponse resp,
                                   long lastModified)
 {
     if (resp.ContainsHeader(HEADER_LASTMOD))
     {
         return;
     }
     if (lastModified >= 0)
     {
         resp.SetDateHeader(HEADER_LASTMOD, lastModified);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// The default behavior of this method is to call ContainsHeader(string name)
 /// on the wrapped response object.
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public bool ContainsHeader(string name)
 {
     return(HttpServletResponse.ContainsHeader(name));
 }
Esempio n. 3
0
 /// <summary>
 /// Sets the Last-Modified entity header field, if it has not
 /// already been set and if the value is meaningful.  Called before
 /// doGet, to ensure that headers are set before response data is
 /// written.  A subclass might have set this header already, so we
 /// check.
 /// </summary>
 /// <param name="resp"></param>
 /// <param name="lastModified"></param>
 private void MaybeSetLastModified(IHttpServletResponse resp,
     long lastModified)
 {
     if (resp.ContainsHeader(HEADER_LASTMOD))
         return;
     if (lastModified >= 0)
         resp.SetDateHeader(HEADER_LASTMOD, lastModified);
 }