hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Moore (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1153) org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage uses URL as cache key - shouldn't.
Date Wed, 18 Jan 2012 14:18:39 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188462#comment-13188462
] 

Jon Moore commented on HTTPCLIENT-1153:
---------------------------------------

I'm somewhat torn here, because this is a bug currently, not a new feature. I'm going to research
what the memcached client does when it gets a key that's too long; if it silently ignores
it (i.e. doesn't do the put, and returns null for a get) or throws an exception we can catch
where we can treat it the same way, then I'm ok not backporting this more thorough fix, as
we won't have correctness problems (we just won't get effective caching, which while not optimal,
is still compliant). If it truncates the key instead, though, then we could have cache collisions
that would result in incorrect behavior, and I'd be more likely to want to backport the fix.

I'll see what I can find out and will post an update.

                
> org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage uses URL as cache
key - shouldn't.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1153
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1153
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.1, 4.1.2
>            Reporter: Clinton Nielsen
>            Assignee: Jon Moore
>             Fix For: 4.1.3, 4.2 Alpha2
>
>
> Spy memcached has 250 defined as max key length:
> http://dustin.github.com/java-memcached-client/apidocs/constant-values.html#net.spy.memcached.MemcachedClientIF.MAX_KEY_LENGTH
> URLs can be (and often are) much longer than 250 characters.
> URLs should be hashed before being used as keys.

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


Mime
View raw message