Commit Graph

1253 Commits

Author SHA1 Message Date
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
Sebastian Bazley f5a01c6cb2 No point checking for null, as instanceof else clause handles it
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044527 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 22:51:44 +00:00
Sebastian Bazley 74581924cc Improve equals performance: no need to check for null; perform cheapest checks first.
Use short-cut evaluation

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044525 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 22:41:07 +00:00
Sebastian Bazley 19022393be Add some more tests for equals
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044524 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 22:38:10 +00:00
Oleg Kalnichevski 50906f44e3 Made #equals and #hashCode of HttpRoute consistent with implementations in other classes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044411 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 15:55:41 +00:00
Sebastian Bazley 75e94a15dc Copy-paste error, should have been HTTPCLIENT-1033
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044371 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 14:21:00 +00:00
Sebastian Bazley 9a4d4f8bdd [HTTPCLIENT-1030] HttpRoute.equals(Object o) is quite inefficient, as it does not take full advantage of shortcut logic
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044366 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 14:15:54 +00:00
Oleg Kalnichevski 1ee5e2ce17 HTTPCLIENT-1028: HttpClient tutorial in simplified Chinese
Contributed by Nanlei <nanlei1987 at gmail.com>


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1044270 13f79535-47bb-0310-9956-ffa450edef68
2010-12-10 10:30:19 +00:00
Sebastian Bazley 4580b4f733 Typo: credenticals => credentials
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043920 13f79535-47bb-0310-9956-ffa450edef68
2010-12-09 12:02:43 +00:00
Sebastian Bazley 0cf974d505 Cut 'n paste error
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043739 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 22:30:32 +00:00
Jonathan Moore e1e7f9c80e Cache revalidation of entries now sends etags of all cached variants on
the conditional request. (Commit of my own patch posted to
https://issues.apache.org/jira/browse/HTTPCLIENT-1024 before I had
commit rights).


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043717 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 22:04:48 +00:00
Oleg Kalnichevski b152f2275b Slightly more precise terminology
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043702 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 21:47:56 +00:00
Sebastian Bazley 9475e26293 HTTPCLIENT-1031 Cannot clone BasicClientCookie2 without specified ports
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043664 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 20:37:53 +00:00
Sebastian Bazley 6e306aa4fd Stuff on Execution Context does not really belong here
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043661 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 20:27:55 +00:00
Sebastian Bazley eb2966babc Execution URI may be absolute if a direct proxy is used
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043659 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 20:25:37 +00:00
Sebastian Bazley 7dadf78223 Grammar
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043658 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 20:24:49 +00:00
Sebastian Bazley 6ec87d3ce7 Clarify URI content in Execution Context
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043518 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 16:53:46 +00:00
Sebastian Bazley 40ef33ce81 Clarify that getURI() may return a relative URI
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043510 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 16:43:29 +00:00
Sebastian Bazley 90de30bf71 Added constant names for parameter name strings
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043489 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 16:18:20 +00:00
Sebastian Bazley 179c717923 Wrong component name - use property instead to ensure correctness
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1042707 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 16:27:43 +00:00
Sebastian Bazley fcc33c2962 Update RN
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1042227 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 19:06:35 +00:00
Sebastian Bazley d1f6c23e10 HTTPCLIENT-1030) Implement "ignoreCookies" CookieSpec
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1042225 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 19:01:02 +00:00
Oleg Kalnichevski e6af69f2e4 Never ever discard Errors by catching and ignoring Throwable
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1042217 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 17:58:08 +00:00
Sebastian Bazley 00751cf322 Tweaks
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1042006 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 21:15:01 +00:00