You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2009/12/29 14:22:29 UTC

[jira] Commented: (CXF-2592) evaluatePreconditions() in RequestImpl should also check the If-None-Match header

    [ https://issues.apache.org/jira/browse/CXF-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795049#action_12795049 ] 

Sergey Beryozkin commented on CXF-2592:
---------------------------------------

here is the code for evaluatePreconditions(EntitiTag tag) :

public ResponseBuilder evaluatePreconditions(EntityTag eTag) {
        ResponseBuilder rb = evaluateIfMatch(eTag);
        if (rb == null) {
            rb = evaluateIfNonMatch(eTag);
        }
        return rb;
    }

evaluateIfNonMatch(EntityTag eTag) should be evaluating If-None-match. 

Does it not work for you ? If yes then can you please some more details please ?


> evaluatePreconditions() in RequestImpl should also check the If-None-Match header
> ---------------------------------------------------------------------------------
>
>                 Key: CXF-2592
>                 URL: https://issues.apache.org/jira/browse/CXF-2592
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.5
>            Reporter: Kent Tong
>
> Currently  the code is:
>     public ResponseBuilder evaluatePreconditions(Date lastModified, EntityTag eTag) {
>         ResponseBuilder rb = evaluatePreconditions(eTag);
>         if (rb != null) {
>             return rb;
>         }
>         return evaluatePreconditions(lastModified);
>     }
>     public ResponseBuilder evaluatePreconditions(EntityTag eTag) {
>         String ifMatch = getHeaderValue(HttpHeaders.IF_MATCH);
>         ...
>     }
> which is checking the If-Match header. While it is fine to check the If-Match header, it should also check the 
> If-None-Match header which is more often used for GET requests, along with the If-Modified-Since header. 
> This is what the two-argument version of evaluatePreconditions() is supposed to do.

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