[ 
https://issues.apache.org/jira/browse/AWF-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tony Stevenson moved DEFT-28 to AWF-71:
---------------------------------------

    Reporter: Niklas Gustavsson
         Key: AWF-71  (was: DEFT-28)
     Project: Apache AWF  (was: Deft)
    
> Handle If-Modified-Since
> ------------------------
>
>                 Key: AWF-71
>                 URL: https://issues.apache.org/jira/browse/AWF-71
>             Project: Apache AWF
>          Issue Type: Bug
>            Reporter: Niklas Gustavsson
>
> To avoid sending resources that don't need to be sent, thus saving bandwidth, 
> HTTP 1.1 defines the If-Modified-Since:  and If-Unmodified-Since: request 
> headers. The former says "only send the resource if it has changed since this 
> date"; the latter says the opposite. Clients aren't required to use them, but 
> HTTP 1.1 servers are required to honor requests that do use them.
> Unfortunately, due to earlier HTTP versions, the date value may be in any of 
> three possible formats:
>     If-Modified-Since:  Fri, 31 Dec 1999 23:59:59 GMT
>     If-Modified-Since:  Friday, 31-Dec-99 23:59:59 GMT
>     If-Modified-Since:  Fri Dec 31 23:59:59 1999
> Again, all time values in HTTP use Greenwich Mean Time (though try to be 
> tolerant of non-GMT times). If a date with a two-digit year seems to be more 
> than 50 years in the future, treat it as being in the past-- this helps with 
> the millennium bug. In fact, do this with any date handling in HTTP 1.1.
> Although servers must accept all three date formats, HTTP 1.1 clients and 
> servers must only generate the first kind.
> If the date in either of these headers is invalid, or is in the future, 
> ignore the header.
> If, without the header, the request would result in an unsuccessful 
> (non-200-level) status code, ignore the header and send the non-200-level 
> response. In other words, only apply these headers when you know the resource 
> would otherwise be sent.
> The If-Modified-Since: header is used with a GET request. If the requested 
> resource has been modified since the given date, ignore the header and return 
> the resource as you normally would. Otherwise, return a "304 Not Modified" 
> response, including the Date: header and no message body, like
>     HTTP/1.1 304 Not Modified
>     Date: Fri, 31 Dec 1999 23:59:59 GMT
>     [blank line here]
> The If-Unmodified-Since: header is similar, but can be used with any method. 
> If the requested resource has not been modified since the given date, ignore 
> the header and return the resource as you normally would. Otherwise, return a 
> "412 Precondition Failed" response, like
>     HTTP/1.1 412 Precondition Failed
>     [blank line here]
> See: http://www.jmarshall.com/easy/http/#http1.1s8

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to