Commit Graph

1769 Commits

Author SHA1 Message Date
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 3b8726022b Added convenience #create methods to UrlEncodedFormEntity
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1231075 13f79535-47bb-0310-9956-ffa450edef68
2012-01-13 14:05:24 +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 ae11627878 HTTPCLIENT-1152: Added credit to Rajika Kumarasiri <rajika at wso2 dot com>
to RELEASE_NOTES.txt for 4.2 alpha2.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1229176 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 14:38:17 +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 46bcf3acf7 Replaced deprecated method calls
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1228888 13f79535-47bb-0310-9956-ffa450edef68
2012-01-08 16:34:06 +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
Sebastian Bazley c4ab5838f6 Fix indentation (no code change)
First indent was 3 chars; looks like a single space was stripped from the start of all lines at some stage

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206925 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 23:56:03 +00:00
Sebastian Bazley 0771f14ea4 Remove un-thrown exceptions
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206923 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 23:44:09 +00:00
Sebastian Bazley c3a8df4016 Missing @Override; indicate that param is long
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206739 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 15:37:09 +00:00
Sebastian Bazley 12a3dbebeb Restore original logic - contentLen = 0 was outside null check
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206736 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 15:29:32 +00:00
Sebastian Bazley 8f91869343 Not sure that instream can be null, but assuming it can, there's no point entering the try block if it's null. This avoids NPE warning
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206734 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 15:28:28 +00:00
Sebastian Bazley 6921a32fa6 Not sure that instream can be null, but assuming it can, there's no point entering the try block if it's null. This avoids NPE warning
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206731 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 15:25:53 +00:00
Sebastian Bazley d7ce4582e2 Unnecessary ;
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206729 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 15:11:32 +00:00
Sebastian Bazley 5470d0746b setFailureCount is not thread-safe, but is not used AFAICT so remove it
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206727 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 14:56:02 +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 c13bbbdd17 HTTPCLIENT-1137: Added credit for Alin Vasile for his patch to the RELEASE_NOTES.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1197718 13f79535-47bb-0310-9956-ffa450edef68
2011-11-04 19:11:31 +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 5dffa49321 Corrected debug log message
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1197196 13f79535-47bb-0310-9956-ffa450edef68
2011-11-03 16:03:58 +00:00
Oleg Kalnichevski ae8e671030 HTTPCLIENT-1142: Infinite loop on NTLM authentication failure
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1197194 13f79535-47bb-0310-9956-ffa450edef68
2011-11-03 15:58:05 +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
Sebastian Bazley e31aeb6f18 Fix EOL-style
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195659 13f79535-47bb-0310-9956-ffa450edef68
2011-10-31 20:39:38 +00:00
Sebastian Bazley 0732af01c1 Drop executable bit
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195657 13f79535-47bb-0310-9956-ffa450edef68
2011-10-31 20:38:59 +00:00
Oleg Kalnichevski 06f9c1031e Fluent HC site updates
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195177 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 15:31:46 +00:00
Oleg Kalnichevski bc6731e3ce Updated DOAP file
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195171 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 14:36:57 +00:00
Oleg Kalnichevski d7d7bb2bde Fixed javadoc warnings
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195170 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 14:32:39 +00:00
Oleg Kalnichevski 00a3cfebc2 Updated download page for HttpClient 4.2-alpha1 release
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195169 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 14:32:16 +00:00
Oleg Kalnichevski f07eea0fb1 Removed file committed by mistake
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195166 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 14:16:38 +00:00
Oleg Kalnichevski 2c54131e0f Release notes for HttpClient 4.2-alpha1 release
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195163 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 14:09:02 +00:00
Oleg Kalnichevski cc7f8c248f More fluent API tweaks; added web site content
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1195162 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 14:08:14 +00:00
Oleg Kalnichevski 41cfb9bbea Tweaked fluent API
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1189929 13f79535-47bb-0310-9956-ffa450edef68
2011-10-27 18:50:52 +00:00
Oleg Kalnichevski d8b5071301 Renamed classes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1189323 13f79535-47bb-0310-9956-ffa450edef68
2011-10-26 17:13:09 +00:00
Oleg Kalnichevski 66e7b84915 Rewrite of the fluent API
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1189320 13f79535-47bb-0310-9956-ffa450edef68
2011-10-26 17:11:41 +00:00
Oleg Kalnichevski 732095943f Redesigned auth caching
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1182515 13f79535-47bb-0310-9956-ffa450edef68
2011-10-12 18:33:15 +00:00
Oleg Kalnichevski 4d1b157272 Updated AuthState API
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1182317 13f79535-47bb-0310-9956-ffa450edef68
2011-10-12 11:45:54 +00:00
Oleg Kalnichevski 9edd1acd4f HTTPCLIENT-1136: fixed synchronization problem in #releaseConnection method
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181989 13f79535-47bb-0310-9956-ffa450edef68
2011-10-11 17:52:00 +00:00
Oleg Kalnichevski 2278378495 HTTPCLIENT-1129: Do not modify auth state on redirect if not redirecting to another host
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181901 13f79535-47bb-0310-9956-ffa450edef68
2011-10-11 17:22:08 +00:00
Oleg Kalnichevski 09f10b0f6e Renamed test classes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181740 13f79535-47bb-0310-9956-ffa450edef68
2011-10-11 12:10:43 +00:00
Oleg Kalnichevski 5d6404cbca BasicClientConnectionManager to replace SingleClientConnManager
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181739 13f79535-47bb-0310-9956-ffa450edef68
2011-10-11 12:10:20 +00:00
Oleg Kalnichevski 94dea64e63 HTTPCLIENT-1123: DNS resolver null parameter check
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181737 13f79535-47bb-0310-9956-ffa450edef68
2011-10-11 12:09:55 +00:00
Oleg Kalnichevski 960ee2f581 HTTPCLIENT-1123: fixed broken PoolingClientConnectionManager constructor
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181208 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 20:18:24 +00:00
Oleg Kalnichevski d1450f9071 HTTPCLIENT-1123: added @since 4.2 tag
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181192 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 20:03:53 +00:00