Age | Commit message (Collapse) | Author |
|
am: 3b37453b1c
* commit '3b37453b1c8a15265640cebf0973ef552e569d33':
Workaround for HttpURLConnection.getFollowRedirects() on M
|
|
HttpURLConnection.setFollowRedirects() has no effect on M due to a bug.
This should be safe / a no-op on other releases.
Bug: https://code.google.com/p/android/issues/detail?id=194495
Change-Id: Ie97861eba0560b63504662baa908f6a5856f68aa
|
|
am: 96c4d0b9f5
* commit '96c4d0b9f58229b9dbba51f1776addedc66f4749':
Add API to get Auth Token Type used by authenticator.
|
|
When using different auth protocols e.g. ClientLogin and
OAuth2 it is important to know the type of the token in order
to construct "Authorization" header. Currently we have to
store auth token vaue/auth token type association elsewhere
which makes it a subject for errors.
Change-Id: I3b8c05672f5394ad806f257c9f6bb378ebf990d7
|
|
* commit '82462cd0a0d7fa58d5497c39534380ad3987fdd1':
Make default timeout/retry/multiplier values public
|
|
Change-Id: Ia5681e2876999f75cea3e4f5f9ef223a06787d4e
(cherry picked from commit 5d563ac2fab08f5e066c6fd6bbf012314be0bf8d)
|
|
Change-Id: Ib33636c959b97243e0187d6574ef0fe078a753c1
|
|
Responses to HEAD requests and any informational (1xx), no content (204)
and not modified (304) responses contain no bodies. This change skips
the response.setEntity(entityFromConnection(connection)) call when dealing
with such responses. This fixes a problem in BasicNetwork where a response
without a body is detected by checking whether the entity is null.
Bug: 176674 - volley java.lang.IllegalStateException: Content has not
been provided
Change-Id: I1b0ce77461ce5bedc7f6a53fd63311ea93ec5af0
|
|
This dumps the URL, which can contain PII.
|
|
Missed a spot in the last commit. All disk I/O should now
be buffered.
|
|
Turns out to be almost 20% faster in a simple benchmark.
|
|
|
|
Change-Id: I6e89f69885a63d524c48b1dec54553d6e16edd48
Signed-off-by: Joris Bolsens <epicblood@gmail.com>
|
|
This flag indicates that the response must NOT be returned after the
cache TTL has expired, but it does not mandate that the response
should not be cached at all (which the code was doing previously).
Change-Id: I61532f3aa8144c50dcee442dc30215bb81ada868
|
|
Change-Id: Ia5db47122af11223b55845ef8423424a9cddbb21
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
|
|
The ScaleType was missing.
Change-Id: I57cba7cbf60df1e47ea9d8baf480765c6e39d821
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
Change-Id: Ibbe796c05e406acd48a0d59090e6be746db24867
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
Change-Id: I51a1beacea4e448e71b7e9c3ec580165d799994a
|
|
add test for public api. not for all classes but for the
most important ones
Change-Id: I494f60568c6caafc23754154fe930d9f90a3bde0
|
|
|
|
Add emma and mockito to the Maven build, and test a
couple random things.
|
|
Restores the API surface to before ScaleType was required.
|
|
(cherry picked from commit 46741f2f5165cbf3cdc0c51107e5ffff8002af5b)
Change-Id: I6fc32971f03d7958a75250e14a7efdb0a12d8d30
|
|
Adds Cache-Control "stale-while-revalidate" header parsing for better
server side cache entry expire setup.
see:
https://www.mnot.net/blog/2007/12/12/stale
http://tools.ietf.org/html/rfc5861
https://groups.google.com/a/chromium.org/forum/m/#!msg/chromium-dev/zchogDvIYrY/ZqWSdt3LJdMJ
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
Change-Id: I1b7baf9997d3a8a251d21631a11deb503e3a7461
|
|
Uses the "Last-Modified" header for "If-Modified-Since"
see http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.3.4
Change-Id: I0f5e9b45f4f79d7c1b286e465f9750dcd71b6bfd
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
|
|
|
|
According to RFC 7159 (Section 8.1), the default encoding of JSON should be UTF-8.
Using ISO-8859-1 as default causes incompatibility with some JSON APIs (e.g. wrong interpretation of internationalized strings).
|
|
Change-Id: I77e705c09937f78af746cd73b6e6d94fd4ee2a03
|
|
- Restructure source to src/{main,test} style
- Add pom.xml and update Android.mk
- Migrate all tests to JUnit4 and Robolectric
- RequestQueueTest is currently @Ignored as fixing it will
involve more extensive refactoring.
- Main library still builds in Gradle; tests do not
Change-Id: I1edc53bb1a54f64d3e806e4572901295ef63e2ca
|
|
Added networkTimeMs to both NetworkResponse and VolleyError.
Set the networkTimeMs in NetworkDispatcher
Added getter method for backoff multiplier of RetryPolicy.
Change-Id: Ief1e079642fea03fe9c4685bb87a29469ae4b8a7
|
|
Change-Id: I83a538bb466b6fd7801961ef47952009bb0defdb
|
|
|
|
Change-Id: I6459f8ecf9f32411ca387631d1298a9ce1c6446b
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
A HTTP 304 response does not have all header fields.
We have to copy the header from the cache entry.
see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5
Change-Id: I197864ad4f2b103edc4a718afea2a35127b7c203
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
Move the request into NetworkDispatcher's loop so that the previously
processed request's reference is not held until the next request
comes off the queue.
|
|
|
|
Add a public accessor for a Request's ErrorListener.
Change-Id: Ifd3b8f818dd0e9db0183f08321043aae7c92c72c
Signed-off-by: Shirish Kalele <kalele@google.com>
|
|
Using a BufferedInputStream significantly reduces the time it takes
to initialize the cache. On my Nexus 5 with ~330 files in cache init
time went from ~2s to ~0.5s with this change.
Change-Id: I3dd909e3235583306ff5943f69e3947a275bf968
Signed-off-by: Fabian Frank <fabian.frank.de@gmail.com>
|
|
This seems like the smallest change that will allow developers to
supply their own ImageRequest class to the ImageLoader without
changing the API. There are several use cases for supplying
custom ImageRequests, including setting custom headers, adjusting
the priority of ImageRequests, and working around Issue #71928.
Change-Id: Ic47452b5f8cada2491a6513cb56f383261c73c3a
|
|
DiskBasedCache.writeHeader() can throw an IOException and swallow it. This causes the
cache entry to be partially written followed by the entry's data. When reading back,
it is possible to read back the data segment (garbled part) when attempting to parse
the cache header.
Change-Id: I3022ca1566bc60e5869bb4ec384c866b4ba5c1c5
|
|
Just look at PUT and POST methods some lines above. The method is set
before calling to addBodyIfExists().
The method should be set before adding the body. Otherwise, some libraries will
try to establish a connection with the wrong method (GET by default).
Change-Id: I993a62cdc5cbccbf54f9bae4f6b183e2edf4304d
|
|
if request was canceled it will have already been removed
from mInFlightRequests and cause NPE
Change-Id: I1ce78bb6b3b2964545a47b5e3bb59bdf1a6d940e
|
|
occurring in Volley when a Request is given a url whose host is null.
Change-Id: Idab1dadaa43bb9176356028221cbdc0f8dd52cdc
|
|
Change-Id: If977c965c8ae3b4d00b958e65679e99a1d29a03a
|
|
|
|
Change-Id: Ib09a68c815f147ade31233d03267df687d8341e0
|
|
|
|
* Add null check to request.CacheEntry() when creating NetworkResponse.
Currently when cache is not used, rather than creating a valid
NetworkResponse object, BasicNetwork.performRequest() throws NPE when
processing a http 304 no modified response. The NetworkResponse object,
if returned with the Volley error, can be used by the volley caller to
determine the http status code.
Change-Id: I007468ed98fb7ed5719a94f871323466e1bd0f8a
|