Commit Graph

246 Commits

Author SHA1 Message Date
Oleg Kalnichevski 9aea057953 Ported internal caching classes to the new execution chain API
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1417343 13f79535-47bb-0310-9956-ffa450edef68
2012-12-05 10:34:46 +00:00
Oleg Kalnichevski 0edf06281f Made CacheConfig consistent with the new config API
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1416582 13f79535-47bb-0310-9956-ffa450edef68
2012-12-03 16:34:27 +00:00
Gary D. Gregory f81dd8f31a The root project defines module the properties used by all the other modules.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1414748 13f79535-47bb-0310-9956-ffa450edef68
2012-11-28 15:17:17 +00:00
Oleg Kalnichevski f24317d156 HTTPCLIENT-1263: CachingHttpClient fails to release connections back to the connection manager for some type of HTTP response messages when used together with DecompressingHttpClient
Contributed by Francois-Xavier Bonnet <francois-xavier.bonnet at centraliens.net>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1412858 13f79535-47bb-0310-9956-ffa450edef68
2012-11-23 12:45:02 +00:00
Sebastian Bazley e9ed1f5725 Fix some obvious boxing in test classes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406888 13f79535-47bb-0310-9956-ffa450edef68
2012-11-08 01:34:17 +00:00
Sebastian Bazley c2e94980e1 Formatter instances need to be closed
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406436 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 03:24:08 +00:00
Sebastian Bazley 4e3cbc31a7 Explicit Boolean rather than boxing
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406435 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 03:23:35 +00:00
Sebastian Bazley 321319c965 Missing @Override
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406426 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 02:47:49 +00:00
Sebastian Bazley e1395539de Unthrown exceptions
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406425 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 02:47:24 +00:00
Sebastian Bazley 73054957f8 Unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406424 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 02:47:01 +00:00
Oleg Kalnichevski 43d4e8f469 HTTPCLIENT-1244: relaxed EasyMock based unit tests in the Caching module
Contributed by Joe Campbell <joseph.r.campbell at gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1395613 13f79535-47bb-0310-9956-ffa450edef68
2012-10-08 15:26:50 +00:00
Jonathan Moore b7d1d69ef6 HTTPCLIENT-1223: Forward port from 4.2.X branch to trunk.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1376181 13f79535-47bb-0310-9956-ffa450edef68
2012-08-22 18:31:52 +00:00
Oleg Kalnichevski 8ef44683ba Upgraded project version to 4.3-alpha1-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1369849 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 13:59:21 +00:00
Oleg Kalnichevski b7f85c1af7 Upgraded project version to 4.2.2-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1356623 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 08:52:49 +00:00
Oleg Kalnichevski faef016a2c HTTPCLIENT-1201: Quick start doc improvements
Contributed by miles zarathustra <albert.bradley at thomsonreuters.com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1353605 13f79535-47bb-0310-9956-ffa450edef68
2012-06-25 15:43:28 +00:00
Jonathan Moore c429b34ca9 HTTPCLIENT-1202: Allow for caching responses without bodies.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1347764 13f79535-47bb-0310-9956-ffa450edef68
2012-06-07 19:43:22 +00:00
Jonathan Moore 2748f2748a HTTPCLIENT-1202: ResponseCachingPolicy had a bug that was making it too
draconian in refusing to cache certain responses.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1347627 13f79535-47bb-0310-9956-ffa450edef68
2012-06-07 14:14:42 +00:00
Jonathan Moore 218823fa4e HTTPCLIENT-1198: HttpHost is not set in HttpContext in CachingHttpClient.
This patch (with tests) primarily just needs to figure out how to set
appropriate context variables in the event of a pure cache hit--in the
event of a cache miss or a cache validation, we actually make an origin
request, and the "backend" client sets these context variables.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1345297 13f79535-47bb-0310-9956-ffa450edef68
2012-06-01 18:09:49 +00:00
Jonathan Moore 59314afc7d Added XML Schema reference for site.xml files.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1344849 13f79535-47bb-0310-9956-ffa450edef68
2012-05-31 18:24:23 +00:00
Oleg Kalnichevski 570aa9fa37 Upgraded project version to 4.2.1-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1340700 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 12:51:21 +00:00
Oleg Kalnichevski 1b063abfa9 HTTPCLIENT-1187: If a revalidation response is deemed too old CachingHttpClient fails to consume its content resulting in a connection leak
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1335726 13f79535-47bb-0310-9956-ffa450edef68
2012-05-08 19:54:27 +00:00
Oleg Kalnichevski a8d2e5e5fa Added release version to deprecation annotations; removed references to deprecated methods / classes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1335088 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 16:06:11 +00:00
Oleg Kalnichevski 747593abb7 Upgraded project version to 4.2-beta2-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1242454 13f79535-47bb-0310-9956-ffa450edef68
2012-02-09 18:40:08 +00:00
Oleg Kalnichevski e7ab117ea5 Added missing ASL header
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1240777 13f79535-47bb-0310-9956-ffa450edef68
2012-02-05 18:17:02 +00:00
Oleg Kalnichevski 648e5ab9be Added missing ASL header
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1240723 13f79535-47bb-0310-9956-ffa450edef68
2012-02-05 13:18:38 +00:00
Oleg Kalnichevski 10f6da691e Moved Memcached specific interfaces from the public API space to the impl package (will also make maintenace of OSGi metadata easier)
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1239803 13f79535-47bb-0310-9956-ffa450edef68
2012-02-02 20:17:10 +00:00
Oleg Kalnichevski 8265a355e7 Fixed javadoc warnings
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1239801 13f79535-47bb-0310-9956-ffa450edef68
2012-02-02 20:15:11 +00:00
Oleg Kalnichevski e2da283f21 HTTPCLIENT-1147: backed out API breaking changes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1239536 13f79535-47bb-0310-9956-ffa450edef68
2012-02-02 11:12:11 +00:00
Jonathan Moore cac1432472 HTTPCLIENT-1154: MemcachedHttpCacheStorage should allow client
to specify custom prefix string for keys. This is implemented by
providing a decorator KeyHashingScheme that adds the prefix.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1232588 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 21:35:08 +00:00
Jonathan Moore d47c30baae HTTPCLIENT-1153: Added a hashing scheme to map the higher-level
logical storage keys the CachingHttpClient wants to store cache
entries under onto a keyspace suitable for use with memcached
(which has a max key length smaller than the logical keys we use).
A default hashing scheme based on SHA-256 is also provided.
Finally, since hashing now introduces the possibility of collisions,
we have to store the logical storage key along with the cache entry
itself so that it can be compared on retrieval. Implemented a new
serialization scheme to accommodate this (with associated interfaces
so this could be overridden if desired). Unfortunately, this meant
that one of the existing constructors that accepted an old-style
custom serializer had to be deprecated (default implementations of
the new serializers are used instead).


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1232489 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 17:12:14 +00:00
Oleg Kalnichevski 76762ca4ed Fixed Java 1.5 compatibility issue
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1230515 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 13:19:02 +00:00
Jonathan Moore 58036bc594 HTTPCLIENT-1157: MemcachedHttpCacheStorage should throw IOExceptions instead of RuntimeExceptions.
Contributed by James Miller <jamesmiller01 at gmail dot com>.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1230174 13f79535-47bb-0310-9956-ffa450edef68
2012-01-11 18:12:50 +00:00
Jonathan Moore e78b50d6de HTTPCLIENT-1152: Also apply type check before byte[] cast on memcached retrieval.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1229203 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 15:27:04 +00:00
Jonathan Moore 9f0bc2474f HTTPCLIENT-1152: Log a WARN-level message if memcached gives us back something other
than a byte[].


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1229172 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 14:33:08 +00:00
Jonathan Moore a6fe2177be HTTPCLIENT-1152: MemcachedHttpCacheStorage should verify class of returned
object before casting. Contributed by Rajika Kumarasiri <rajika at wso2 dot com>.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1229169 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 14:28:38 +00:00
Oleg Kalnichevski 8f767628cf HTTPCLIENT-1155: CachingHttpClient fails to ensure that the response content gets fully consumed when using a ResponseHandler, which can potentially lead to connection leaks
Contributed by James Miller <jamesmiller01 at gmail dot com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1222845 13f79535-47bb-0310-9956-ffa450edef68
2011-12-23 20:59:54 +00:00
Oleg Kalnichevski cb6254fea6 Rewrote test case for HTTPCLIENT-1147: removed dependency on an external resource; removed hard-coded cache directory location
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1222843 13f79535-47bb-0310-9956-ffa450edef68
2011-12-23 20:57:11 +00:00
Oleg Kalnichevski a6db7c5185 HTTPCLIENT-1147: When HttpClient-Cache cannot open cache file, should act like miss
Contributed by Joe Campbell <joseph.r.campbell at gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1209503 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 14:15:11 +00:00
Oleg Kalnichevski 5b89c1097f HTTPCLIENT-1144: Caching client has a class for common headers that was not being used consistently in the code
Contributed by Joe Campbell <joseph.r.campbell at gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1209502 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 14:13:52 +00:00
Jonathan Moore fceb87e3bc HTTPCLIENT-1143: Added ASL header to ConsumableInputStream test class.
Credited James Miller in Release Notes.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1198941 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:13:45 +00:00
Jonathan Moore c8aafc5c1a HTTPCLIENT-1143: CachingHttpClient leaks connections with stale-if-error.
Bugfix from James Miller <jamesmiller01 at gmail dot com>.



git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1198939 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:09:41 +00:00
Jonathan Moore d19daa3dcd HTTPCLIENT-1137: The values for the Via header are created by httpclient-cache
for each cached and backend request. Committing patch by alinachegalati at yahoo dot com.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1197713 13f79535-47bb-0310-9956-ffa450edef68
2011-11-04 19:07:52 +00:00
Oleg Kalnichevski 7541429cf2 Upgraded project version to 4.2-alpha2-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1196788 13f79535-47bb-0310-9956-ffa450edef68
2011-11-02 20:19:52 +00:00
Oleg Kalnichevski b1bad18c8c Added inceptionYear to httpclient-cache and fluent-hc poms
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195711 13f79535-47bb-0310-9956-ffa450edef68
2011-10-31 22:50:56 +00:00
Oleg Kalnichevski 61ab54d99d HTTPCLIENT-1135: RandomAccessFile mode w is not valid
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1180373 13f79535-47bb-0310-9956-ffa450edef68
2011-10-08 13:12:12 +00:00
Oleg Kalnichevski 72a41afd5e HTTPCLIENT-1116: ResponseCachingPolicy uses integers for sizes
Contributed by Greg Bowyer <gbowyer at fastmail.co.uk >


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1172302 13f79535-47bb-0310-9956-ffa450edef68
2011-09-18 16:32:53 +00:00
Oleg Kalnichevski e5ea32b76d TABS -> SPACES
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1172301 13f79535-47bb-0310-9956-ffa450edef68
2011-09-18 16:20:20 +00:00
Sebastian Bazley 01b39c4883 Add version variables for report plugins
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1167667 13f79535-47bb-0310-9956-ffa450edef68
2011-09-11 03:28:11 +00:00
Jonathan Moore 2d017dcc0e HTTPCLIENT-1100: Missing Content-Length header makes cached entry invalid.
Applying patch provided by Bart Robeyns <bart dot robeyns at gmail dot com>


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1133907 13f79535-47bb-0310-9956-ffa450edef68
2011-06-09 15:01:42 +00:00
Jonathan Moore 8dbbed80cc Reverting changeset r1133877 (duplicate addition of spymemcached repository).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1133902 13f79535-47bb-0310-9956-ffa450edef68
2011-06-09 14:52:41 +00:00