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

Simon Nash resolved TUSCANY-3742.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-2.x

Fixed in the 1.6.1 branch under revision r1025776, the 1.x trunk under revision 
r1027658, and the 2.x trunk under revision r1027684.

In the 2.x trunk I have also re-enabled testUnmodifiedGetIfUnModified() which 
was disabled because of this problem (see TUSCANY-3299).  

> binding.atom service problems with If-Modified-Since and If-Unmodified-Since 
> headers
> ------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3742
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3742
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA ATOM Binding Extension
>    Affects Versions: Java-SCA-1.6
>            Reporter: Simon Nash
>            Assignee: Simon Nash
>             Fix For: Java-SCA-1.6.1, Java-SCA-2.x
>
>
> The timestamp comparison performed by AtomBindingListenerServlet for the 
> If-Modified-Since and If-Unmodified-Since HTTP headers can produce incorrect 
> results in some cases.
> Consider the following sequences of events.
> Scenario A:
> 1. At time T1, a client of an Atom feed modifies the feed
> 2. The client then records the current time T2
> 3. The client then sends a GET request with If-Modified-Since: T2
> 4. The client expects the server to send a 304 response because the feed has 
> not been modified since time T1.  On some occasions this happens but on other 
> occasions the server sends a 200 response.
> Scenario B:
> 1. At time T1, a client of an Atom feed modifies the feed
> 2. The client then records the current time T2
> 3. The client then sends a GET request with If-Unmodified-Since: T2
> 4. The client expects the server to send a 200 response because the feed has 
> not been modified since time T1.  On some occasions this happens but on other 
> occasions the server sends a 304 response.
> These problems are caused by the millseconds component of time T2 being lost 
> when time T2 is formatted as an exact number of seconds for insertion into 
> the If-Modified-Since or If-Unmodified-Since header.
> For example if the following applies:
>  T1 == 12:34:56.100
>  T2 == 12:34:56.300
> the time T2 is transmitted by the client as 12:34:56.000 and appears to the 
> server to be an earlier time than T1 (incorrect).
> However if the following applies:
>  T1 == 12:34:56.900
>  T2 == 12:34:57.100
> the time T2 is transmitted by the client as 12:34:57.000 and appears to the 
> server to be a later time than T1 (correct).
> This is the cause of the occasional test case failures described in 
> TUSCANY-3299.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to