Beispiel #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);
     }
 }
Beispiel #2
0
 /// <summary>
 /// The default behavior of this method is to call SetDateHeader(string name, long date)
 /// on the wrapped response object.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="date"></param>
 public void SetDateHeader(string name, long date)
 {
     HttpServletResponse.SetDateHeader(name, date);
 }
Beispiel #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);
 }