You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Francois-Xavier Bonnet (Created) (JIRA)" <ji...@apache.org> on 2012/04/12 12:03:18 UTC

[jira] [Created] (HTTPCLIENT-1183) HTTP/1.0 requests not serveable from cache

HTTP/1.0 requests not serveable from cache
------------------------------------------

                 Key: HTTPCLIENT-1183
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1183
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: Cache
            Reporter: Francois-Xavier Bonnet


Any HTTP/1.0 request is considered as not serveable from cache (only HTTP/1.1 requests are serveable from cache). This is implemented in method org.apache.http.impl.client.cache.CacheableRequestPolicy.isServableFromCache(HttpRequest)

What is the reason for this behaviour? According to the specifications, HTTP/1.0 request are supposed to be cacheable even if the mechanism is more primitive than for HTTP/1.1 requests (only based on Expires and Last-Modified headers).

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1183) HTTP/1.0 requests not serveable from cache

Posted by "Jon Moore (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Moore updated HTTPCLIENT-1183:
----------------------------------

    Attachment: 1.0-requests-cacheable.patch

@Francois-Xavier: you made me curious enough to check. Attached is a patch with a unit test that demonstrates that HTTP/1.0 requests can be served from the cache. So, I think this is not actually a bug.

                
> HTTP/1.0 requests not serveable from cache
> ------------------------------------------
>
>                 Key: HTTPCLIENT-1183
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1183
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>            Reporter: Francois-Xavier Bonnet
>         Attachments: 1.0-requests-cacheable.patch
>
>
> Any HTTP/1.0 request is considered as not serveable from cache (only HTTP/1.1 requests are serveable from cache). This is implemented in method org.apache.http.impl.client.cache.CacheableRequestPolicy.isServableFromCache(HttpRequest)
> What is the reason for this behaviour? According to the specifications, HTTP/1.0 request are supposed to be cacheable even if the mechanism is more primitive than for HTTP/1.1 requests (only based on Expires and Last-Modified headers).

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1183) HTTP/1.0 requests not serveable from cache

Posted by "Jon Moore (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252339#comment-13252339 ] 

Jon Moore commented on HTTPCLIENT-1183:
---------------------------------------

Actually, an incoming HTTP/1.0 request gets upgraded to HTTP/1.1 by RequestProtocolCompliance, and hence is suitable for being satisfied by the cache. The check in here is to guard against non-HTTP/1.x requests being satisfied by the cache--since it doesn't understand those protocols it is not safe for the cache to cache responses.

Can you produce a unit test that shows that an HTTP/1.0 request that receives a cacheable response doesn't get served from cache?

                
> HTTP/1.0 requests not serveable from cache
> ------------------------------------------
>
>                 Key: HTTPCLIENT-1183
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1183
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>            Reporter: Francois-Xavier Bonnet
>
> Any HTTP/1.0 request is considered as not serveable from cache (only HTTP/1.1 requests are serveable from cache). This is implemented in method org.apache.http.impl.client.cache.CacheableRequestPolicy.isServableFromCache(HttpRequest)
> What is the reason for this behaviour? According to the specifications, HTTP/1.0 request are supposed to be cacheable even if the mechanism is more primitive than for HTTP/1.1 requests (only based on Expires and Last-Modified headers).

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Resolved] (HTTPCLIENT-1183) HTTP/1.0 requests not serveable from cache

Posted by "Jon Moore (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Moore resolved HTTPCLIENT-1183.
-----------------------------------

    Resolution: Invalid
      Assignee: Jon Moore
    
> HTTP/1.0 requests not serveable from cache
> ------------------------------------------
>
>                 Key: HTTPCLIENT-1183
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1183
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>            Reporter: Francois-Xavier Bonnet
>            Assignee: Jon Moore
>         Attachments: 1.0-requests-cacheable.patch
>
>
> Any HTTP/1.0 request is considered as not serveable from cache (only HTTP/1.1 requests are serveable from cache). This is implemented in method org.apache.http.impl.client.cache.CacheableRequestPolicy.isServableFromCache(HttpRequest)
> What is the reason for this behaviour? According to the specifications, HTTP/1.0 request are supposed to be cacheable even if the mechanism is more primitive than for HTTP/1.1 requests (only based on Expires and Last-Modified headers).

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1183) HTTP/1.0 requests not serveable from cache

Posted by "Francois-Xavier Bonnet (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252382#comment-13252382 ] 

Francois-Xavier Bonnet commented on HTTPCLIENT-1183:
----------------------------------------------------

You are right. I have just done almost the same test and had the same result.
Thanks for your help. I had just read the code, next time I will test before asking questions.
                
> HTTP/1.0 requests not serveable from cache
> ------------------------------------------
>
>                 Key: HTTPCLIENT-1183
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1183
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>            Reporter: Francois-Xavier Bonnet
>            Assignee: Jon Moore
>         Attachments: 1.0-requests-cacheable.patch
>
>
> Any HTTP/1.0 request is considered as not serveable from cache (only HTTP/1.1 requests are serveable from cache). This is implemented in method org.apache.http.impl.client.cache.CacheableRequestPolicy.isServableFromCache(HttpRequest)
> What is the reason for this behaviour? According to the specifications, HTTP/1.0 request are supposed to be cacheable even if the mechanism is more primitive than for HTTP/1.1 requests (only based on Expires and Last-Modified headers).

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org