Commit Graph

1508 Commits

Author SHA1 Message Date
Sebastian Bazley 75dd0ae7dd DOcument thread-safety
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055728 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 03:10:21 +00:00
Sebastian Bazley 7550a6edf6 Make private immutable fields final
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055727 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 03:06:51 +00:00
Sebastian Bazley d9090f3d37 Not @Immutable, but it is @ThreadSafe
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055726 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 03:05:55 +00:00
Sebastian Bazley 4896d1752c Tab police
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055725 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 03:02:16 +00:00
Sebastian Bazley 3b4b68fe68 Javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055723 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 02:57:48 +00:00
Sebastian Bazley 5e95645f07 Missing @Overrides
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055722 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 02:57:27 +00:00
Sebastian Bazley 37e01683fa Exception not thrown
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055721 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 02:56:23 +00:00
Sebastian Bazley 6a970590c0 Unnecessary cast
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055720 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 02:54:42 +00:00
Sebastian Bazley 992078af1c Remove unnecessary store
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055715 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 02:33:22 +00:00
Oleg Kalnichevski a703914575 HTTPCLIENT-1026: shut down connection manager in a try-finally
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055629 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 20:39:15 +00:00
Oleg Kalnichevski 441006d804 Use special HttpRoutedConnection interafce to access route details in the protocol level classes, as ManagedClientConnection interface is blocking I/O model specific
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055464 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 14:16:08 +00:00
Oleg Kalnichevski e95f6ce960 Always use remote port of the underyling connection as default when creating CookieOrigin instance
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055406 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 10:54:20 +00:00
Oleg Kalnichevski 232ee999c8 Corrected debug logs: report zero keep-alive duration as indefinite; use better terminology ('indefinitely' instead of 'for ever')
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1054960 13f79535-47bb-0310-9956-ffa450edef68
2011-01-04 10:26:15 +00:00
Oleg Kalnichevski dafdf43025 Fixed misspelled method name
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1053832 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 09:10:00 +00:00
Oleg Kalnichevski 261fb7d7db Moved target host extraction code to a re-usable static method in the URIUtils class
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1053679 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 17:35:36 +00:00
Oleg Kalnichevski 21aae1dfe2 Removed calls to deprecated methods
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1053675 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 17:05:04 +00:00
Oleg Kalnichevski eda06a75ee Removed static socket factories; adjusted Scheme#hashCode and Scheme#equals
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1053589 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 09:54:02 +00:00
Oleg Kalnichevski 18de7cda9c Support for default scheme initialization; no args constructor for pooling connection and single connection managers
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1053367 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 15:18:26 +00:00
Jonathan Moore b9851bc11c Changed bad host for retry handler tests to bogus.example.com
from www.complete.garbage.invalid, which seems to have better
timing properties for me (and hopefully Hudson).


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1053062 13f79535-47bb-0310-9956-ffa450edef68
2010-12-27 13:07:53 +00:00
Jonathan Moore 4a63d6a0da Fixed compiler warnings (unused imports, unused private methods).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1053060 13f79535-47bb-0310-9956-ffa450edef68
2010-12-27 12:55:32 +00:00
Jonathan Moore 856c1c28ad HTTPCLIENT-1035: committed validating acceptance test and wired in new
cache invalidation call. Also cleaned up some unit tests in
TestCachingHttpClient: static imports of EasyMock methods, as well as
removing unit tests that exercised some protected methods, especially
where they are already covered by acceptance tests against a public
interface (unit testing protected methods leads to brittle tests). Also
rewrite some of the unit tests in TestCachingHttpClient to depend on
fewer mocks (often, just a mock backend HttpClient and mock cache
storage).


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1052894 13f79535-47bb-0310-9956-ffa450edef68
2010-12-26 15:10:39 +00:00
Jonathan Moore 7b99aca6ab HTTPCLIENT-1035: finished cache-flushing logic for updated
entries mentioned by Content-Location in responses. Still
not hooked in to main request handling flow yet.



git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1052234 13f79535-47bb-0310-9956-ffa450edef68
2010-12-23 12:02:37 +00:00
Jonathan Moore 68ed95699e HTTPCLIENT-1035: begin adding functionality for flushing updated
entries mentioned by Content-Location in responses. Not yet hooked
in to be used.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051865 13f79535-47bb-0310-9956-ffa450edef68
2010-12-22 11:59:23 +00:00
Sebastian Bazley 7bd182d481 Make mode a final field of HttpMultipart
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051681 13f79535-47bb-0310-9956-ffa450edef68
2010-12-21 22:25:45 +00:00
Sebastian Bazley 4c24320359 Javadoc
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051680 13f79535-47bb-0310-9956-ffa450edef68
2010-12-21 22:23:59 +00:00
Sebastian Bazley 4f5d4b0d7e Remove unnecessary null checks for mimeType and TransferEncoding
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051664 13f79535-47bb-0310-9956-ffa450edef68
2010-12-21 21:43:56 +00:00
Oleg Kalnichevski 0dbecf3a49 Fixed broken test cases
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051425 13f79535-47bb-0310-9956-ffa450edef68
2010-12-21 09:07:42 +00:00
Sebastian Bazley c1e0539a93 Fix Javadoc for current behaviour
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051355 13f79535-47bb-0310-9956-ffa450edef68
2010-12-21 01:50:35 +00:00
Jonathan Moore 52f311f5de HTTPCLIENT-975: stale-while-revalidate also yields to must-revalidate,
proxy-revalidate on a shared cache, and requests with explicit
freshness constraints.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051235 13f79535-47bb-0310-9956-ffa450edef68
2010-12-20 18:30:46 +00:00
Jonathan Moore df577a7e8f HTTPCLIENT-975: stale-if-error now yields to higher-priority
directives, like must-revalidate, proxy-revalidate, and requests
with explicit freshness constraints.


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051206 13f79535-47bb-0310-9956-ffa450edef68
2010-12-20 16:55:03 +00:00
Jonathan Moore 7573bf8284 HTTPCLIENT-975: more method extraction; the body for
CachingHttpClient#execute now at least fits on one screen. :)


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051133 13f79535-47bb-0310-9956-ffa450edef68
2010-12-20 14:42:34 +00:00
Jonathan Moore 65cb252c9b HTTPCLIENT-975: more method extraction from the body of
CachingHttpClient#execute()


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1051087 13f79535-47bb-0310-9956-ffa450edef68
2010-12-20 12:51:26 +00:00
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