Jonathan Moore
cd263f39e3
HTTPCLIENT-975: more refactoring/method-extraction
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051076 13f79535-47bb-0310-9956-ffa450edef68
2010-12-20 12:12:55 +00:00
Jonathan Moore
791bb497e2
HTTPCLIENT-975: more refactoring. Handled ProtocolExceptions from
...
RequestWrapper instantiations further down in the call stack.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051074 13f79535-47bb-0310-9956-ffa450edef68
2010-12-20 11:58:53 +00:00
Jonathan Moore
93603e5f19
HTTPCLIENT-975: refactoring primary execute method in
...
CachingHttpClient (mostly method extraction).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050878 13f79535-47bb-0310-9956-ffa450edef68
2010-12-19 15:25:04 +00:00
Jonathan Moore
a6c38788c0
HTTPCLIENT-975: Javadoc and formatting cleanup.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050624 13f79535-47bb-0310-9956-ffa450edef68
2010-12-18 12:06:28 +00:00
Jonathan Moore
1d4465bdb5
HTTPCLIENT-975: Javadoc and import cleanup.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050622 13f79535-47bb-0310-9956-ffa450edef68
2010-12-18 11:58:37 +00:00
Jonathan Moore
155a9c61c3
HTTPCLIENT-975: Make AsynchronousValidator class package-private.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050620 13f79535-47bb-0310-9956-ffa450edef68
2010-12-18 11:55:09 +00:00
Jonathan Moore
83efe306fd
HTTPCLIENT-975: added CacheConfig settings to provide more detailed
...
control over the background revalidation thread pool, and enabled
the stale-while-revalidate feature by default with a single worker
thread and a max queue size of 100 pending revalidations, which
should be a pretty safe setting.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050360 13f79535-47bb-0310-9956-ffa450edef68
2010-12-17 12:15:50 +00:00
Sebastian Bazley
d012c1041c
Might help if the import was removed too ...
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050267 13f79535-47bb-0310-9956-ffa450edef68
2010-12-17 02:49:15 +00:00
Sebastian Bazley
820817d0b8
Annotations can currently only be used in httpclient module
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050264 13f79535-47bb-0310-9956-ffa450edef68
2010-12-17 02:12:18 +00:00
Sebastian Bazley
4eec65b378
Document thread safety
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050254 13f79535-47bb-0310-9956-ffa450edef68
2010-12-17 00:28:00 +00:00
Sebastian Bazley
36607de8cc
Might as well be final, as it's not changed
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050253 13f79535-47bb-0310-9956-ffa450edef68
2010-12-17 00:27:36 +00:00
Sebastian Bazley
1abae928c1
HTTPCLIENT-975 was fixed after 4.1-beta1
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050243 13f79535-47bb-0310-9956-ffa450edef68
2010-12-17 00:02:41 +00:00
Sebastian Bazley
3a022b2cf9
HTTPCLIENT-1036 StringBody has incorrect default for characterset.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050239 13f79535-47bb-0310-9956-ffa450edef68
2010-12-16 23:59:08 +00:00
Oleg Kalnichevski
eb0eab0a86
Code clean-ups
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050152 13f79535-47bb-0310-9956-ffa450edef68
2010-12-16 20:42:22 +00:00
Jonathan Moore
3f3dc38dbb
Fixed svn:eol-style.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1050143 13f79535-47bb-0310-9956-ffa450edef68
2010-12-16 20:29:47 +00:00
Jonathan Moore
5f88f05627
HTTPCLIENT-975: committed patch for stale-while-revalidate from
...
Michajlo Matijkiw (michajlo_matijkiw at comcast dot com).
Stale-while-revalidate functionality is currently off by default
until we can add bounding to the revalidation queue (or make it
configurable).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049941 13f79535-47bb-0310-9956-ffa450edef68
2010-12-16 11:54:30 +00:00
Sebastian Bazley
318d74af0c
Javadoc
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049767 13f79535-47bb-0310-9956-ffa450edef68
2010-12-16 01:47:43 +00:00
Sebastian Bazley
d1e2ee3c82
Javadoc
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049721 13f79535-47bb-0310-9956-ffa450edef68
2010-12-15 21:42:33 +00:00
Jonathan Moore
3c0cef4586
Added additional acceptance test for variant negotiation:
...
"If any of the existing cache entries contains only partial content
for the associated entity, its entity-tag SHOULD NOT be included in
the If-None-Match header field unless the request is for a range
that would be fully satisfied by that entry."
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.6 )
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049287 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 21:37:31 +00:00
Jonathan Moore
d60c36c40c
Renamed URIExtractor to CacheKeyGenerator, which is more descriptive
...
of what we actually use it for.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049278 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 21:18:06 +00:00
Jonathan Moore
7bb8ecbf98
HTTPCLIENT-975: updated ChangeLog with stale-if-error contribution.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049183 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 17:24:10 +00:00
Jonathan Moore
a91847b57c
HTTPCLIENT-975: committed patch to support stale-if-error from
...
RFC5861, with thanks to Mohammed Azeem Uddin
(mohammedazeem_uddin at comcast dot com).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049179 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 17:18:06 +00:00
Sebastian Bazley
8aef0609de
eol-style
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049159 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 16:58:20 +00:00
Jonathan Moore
70e7ee17d5
HTTPCLIENT-1034: committed patch to update documentation to list
...
httpclient-cache as a module of the HttpClient component, plus
adding a link to the external benchmarking writeup done by
Comcast Interactive Media. With thanks to Matthew Hawthorne
(matthew_hawthorne -at- comcast.com).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049124 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 15:27:35 +00:00
Jonathan Moore
6eaaac8251
Added ASF header to Variant.java.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049099 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 14:16:47 +00:00
Jonathan Moore
0ae68981c8
HTTPCLIENT-1032: during variant negotiation, when the origin specifies
...
reuse of an existing variant, we no longer cache another copy of the
variant, but rather update the variantMap in the parent entry to
reflect the variant's reuse for requests whose varying headers match
those of the current request.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049051 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 11:48:34 +00:00
Jonathan Moore
e16a59b38c
HTTPCLIENT-1032: added a method to HttpCache to allow updating a specific
...
variant cache entry if its cache key is known. Committed patch with the
additional acceptance test, which now passes. We are still caching extra
copies of the re-used variant, though, so the issue is not yet closed.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049048 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 11:30:10 +00:00
Jonathan Moore
477fdb1a3c
HTTPCLIENT-1032: variant information is now passed back from the HttpCache
...
as a Map<String,Variant> mapping Etags to specific information about the
variants (variant key, cache key, cache entry).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1049045 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 11:12:36 +00:00
Sebastian Bazley
022c25070e
Javadoc - explain deprecation
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1048912 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 02:14:11 +00:00
Sebastian Bazley
ef1e4d0890
HTTPCLIENT-911 Support underscore in domain name, or provide better exception
...
If getHost() returns null, extract host:port from getAuthority()
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1048881 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 00:53:54 +00:00
Jonathan Moore
6e5139df32
HTTPCLIENT-1032: added a Variant class to track a set of related
...
information about a particular cached variant.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045389 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 22:14:07 +00:00
Sebastian Bazley
0b5e40c11d
Revert accidental changes made in r980937
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045364 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 20:33:05 +00:00
Jonathan Moore
ae8764760b
HTTPCLIENT-1032: caching of 200 origin response from variant
...
negotiation should be stored w.r.t. original client request.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045360 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 20:25:08 +00:00
Jonathan Moore
24a5f0c060
HTTPCLIENT-1032: Refactor to clean up duplicated code in cache
...
entry validation (regular, and variant reuse negotation) by
extracting code to shared method.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045357 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 20:17:49 +00:00
Jonathan Moore
a26fb6a846
Fixing pom (build was barfing on "--" inside an XML comment).
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045291 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 18:51:55 +00:00
Sebastian Bazley
888f35b0d4
Junit 4.8.1 => 4.8.2
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045261 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 17:54:27 +00:00
Sebastian Bazley
a11743431b
Fix up clirr version comparison so defaults to 4.0, except cache=4.1-alpha2
...
Can also override individually using -DcomparisonVersion and -Dcache.comparisonVersion
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045260 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 17:53:59 +00:00
Sebastian Bazley
3fc9bd963c
Extract setup of default HttpParams into public static method
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045232 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 16:59:32 +00:00
Jonathan Moore
618754b6a9
HTTPCLIENT-1032: renamed HttpCache#getVariantCacheEntries to
...
HttpCache#getVariantCacheEntriesWithEtags and had it return a
Map of etags to cache entries. Doing the filtering here makes
it simpler downstream, and returning a map makes it easier to
find the appropriate entry when handling a 304 indicating we
should use an existing variant.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045084 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 11:55:36 +00:00
Sebastian Bazley
7f95be93c3
Clirr does not make sense for OSGI packaging module
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045079 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 11:49:05 +00:00
Sebastian Bazley
967b8af955
Document initial parameter settings
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1045074 13f79535-47bb-0310-9956-ffa450edef68
2010-12-13 11:35:35 +00:00
Jonathan Moore
62dd08891c
HTTPCLIENT-1032: variant storage now separates a "variant key" (determined by
...
the portion of a request covered by Vary headers on an entry) from a
"variant cache key" (the place in the cache storage where a particular variant
response is stored). The variantMap in an HttpCacheEntry now maps variant keys
to variant cache keys, setting us up for the possibility of having multiple
variant keys point to the same variant cache entry.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044826 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 14:37:48 +00:00
Jonathan Moore
4e7d9fa5c8
HTTPCLIENT-1032: minor refactoring on URIExtractor to clean up
...
internal-only API for getVariantKey()
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044824 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 14:24:25 +00:00
Jonathan Moore
2c04f2689b
HTTPCLIENT-1032: fix Javadocs on HttpCacheEntry.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044820 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 13:29:43 +00:00
Jonathan Moore
e025613aab
HTTPCLIENT-1032: change variant storage mechanism in HttpCacheEntry from
...
a Set to a Map; Set-based interface retained for backwards-compatibility.
Currently, the map just maps a variantURI to itself--in essence it is
still really just a set; however, this sets us up for mapping different
variant keys to the same cache key (coming next).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044818 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 13:24:29 +00:00
Jonathan Moore
9771dcd667
Disabling logging during unit tests.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044728 13f79535-47bb-0310-9956-ffa450edef68
2010-12-11 21:36:18 +00:00
Jonathan Moore
7359258155
HTTPCLIENT-1032: additional test coverage for CacheEntryUpdater. Also,
...
fixed small bug where Warning headers should not be removed from an
entry if the origin response is not used for updating cache entry
headers because it is post-dated.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044648 13f79535-47bb-0310-9956-ffa450edef68
2010-12-11 13:12:05 +00:00
Oleg Kalnichevski
ef148fc522
TABS -> SPACES
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044639 13f79535-47bb-0310-9956-ffa450edef68
2010-12-11 11:57:09 +00:00
Jonathan Moore
f1add71205
Convert tabs to spaces.
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044637 13f79535-47bb-0310-9956-ffa450edef68
2010-12-11 11:45:50 +00:00
Jonathan Moore
47a66573e9
HTTPCLIENT-1032: additional unit test coverage for HttpCacheEntry
...
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044636 13f79535-47bb-0310-9956-ffa450edef68
2010-12-11 11:33:42 +00:00