| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This adds CTS tests that assert that platform-provided URLConnection
instances that use cleartext HTTP honor the cleartext traffic policy
from NetworkSecurityPolicy.
Bug: 19215516
Change-Id: I79f5fce5e00434e96f4325c1aae65a573f10dcdd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This hidden libcore API is to be used by bundled network stacks to
determine whether cleartext network traffic is permitted. These stacks
cannot directly use the public Android framework API
android.security.NetworkSecurityPolicy because the framework package
typically compile-time depends on the packages offering these bundled
network stacks.
As an example, this CL makes java.util.logging.SocketHandler and
platform-provided URLConnection instances for the FTP protocol honor
this new flag.
To avoid duplication, the intention is that framework's
android.security.NetworkSecurityPolicy implementaion will switch to
this new libcore API to store/retrive the state of framework's
NetworkSecurityPolicy class.
Bug: 19215516
Change-Id: I78e348458975d69c52918582a43db25df87e2a15
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is meant to be a partial replacement for apache's
EntityUtils.toString for internal callers. Providing a stand
in replacement seems like a bad idea because that API tries
to coerce all responses into strings, even those that are
binary.
I'm torn about EntityUtils. It was a useful "utility" in some
cases, but dangerous in others.
bug: 18027885
Change-Id: Ia02ffe86b5ef5caecbe86069967a549ff09335e5
|
|
|
|
|
| |
Bug: 18390752
Change-Id: Iaffa75629a7b618dd8809416934733e7314bf820
|
|
|
|
|
| |
Bug: https://code.google.com/p/android/issues/detail?id=78909
Change-Id: I47ac0141275bba0cce3f5d34229235b60eb19d30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A set of observer / listener components for network
events.
Party A, e.g. the Android ConnectivityManager, can make
changes to network configuration that impacts the java
network objects (e.g. connection pools, caches, etc.).
Party B, e.g. Android libcore network components are
interested in network configuration changes.
The NetworkEventDispatcher enables Party A to communicate
with Party B without hardcoding their details. Additional
parties like B can be added.
Bug: 17314604
Change-Id: I175bdf28662bafcf0c91acb51a3da5cbc2b69086
|
|
|
|
|
|
|
| |
Based on looking at IANA and wikipedia.
Bug: 16978217
Change-Id: I0d28c6d53ec26c7d5501f722b66dd50595e2a6b4
|
|
|
|
|
| |
Bug: 15715370
Change-Id: I2d99f070c3debea01621a172d8189951a56736b5
|
|
|
|
| |
Change-Id: Id724b75dd78b68ed00f5db4989c4070896996ec0
|
|
|
|
|
|
|
| |
The RFC seems pretty clear on this issue.
Bug: http://code.google.com/p/android/issues/detail?id=28294
Change-Id: Ia9a979e1fbbd8b38b1607059c042e0fc9ca44270
|
|
|
|
|
| |
Bug: http://b/4460598
Change-Id: I5f274b2109861b9d2ed59eda8b3e5b4e89fd27b3
|
|
|
|
|
|
|
|
|
|
| |
This fixes the problem reported in the bug, but we still need
to give attention to the digest scheme. Currently we can't do
Basic auth if the HTTP response contains both a Digest challenge
and a Basic challenge!
Bug: http://code.google.com/p/android/issues/detail?id=19081
Change-Id: Ifffb307678c2afa0db1d50c1ef5fc49ec7769306
|
|
|
|
|
|
|
|
|
|
| |
It's a lot of work to cache partial responses properly. We've
punted on this for the built-in HttpResponseCache.
This test passed once, but only because we were using a stub
response cache that didn't interpret 206s properly.
Change-Id: I2ee5ae2d5dc9a9d52d499411b281d647e658f21d
|
|
|
|
|
|
|
|
| |
Our testing tools cannot normally test package-private APIs
because the tests are loaded in a different class loader than
the production classes. This is an unfortunate workaround.
Change-Id: Ic8d9d3088887bccceaf166959468cd52bfef9aae
|
|
|
|
| |
Change-Id: I4dac34f88b23484643bce31e5f25ac6eb1fea426
|
|
|
|
|
|
|
|
| |
This needs to add another mode to canonicalizePath to not
discard ".." prefixes from relative paths.
Change-Id: I9e0b86bd1e7ab8e5e71c46f1efcf4aeb218e66b2
http://b/2753295
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes many broken cases on handling relative URLs.
We normalize all URLs by default. This will result
in more URL equality than before. Previously the URLs
http://android.com/a/../ and http://android.com/ were not
equal; now they are equal.
Change-Id: I8cf7be2e42eeb1386520be2698d8f14e0a55decb
http://b/4361656
|
|\ |
|
| |
| |
| |
| |
| | |
Change-Id: Ifdf15dc2f551e58bdd6a1aae847f7dec254ac7e8
http://b/3180373
|
|/
|
|
| |
Change-Id: Ia0c4f95e62825a4ed4debac2578d353491a7ff2c
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the filesystem fails, cache performance degrades. Ongoing
writes should not see any filesystem errors: don't punish the
writer who isn't benefitting from the cache. Ongoing reads may
see IOExceptions while streaming files. In practice this will
only happen if the directory disappears during use, as is the
case when a removable partition is removed.
Change-Id: Ibf4d51998d9beaba9f8c86c449fd5c97ca869cee
http://b/3180373
|
|
|
|
|
|
|
|
|
| |
This requires a backdoor for the cache to read the request headers
at put time. This is implemented by getting the HttpEngine, which
will allow us to eventually share the response header parsing.
Change-Id: I177467244e5af0a3dda07883cd58d641bf75362f
http://b/3180373
|
|
|
|
|
| |
Change-Id: Ia6c88f292088bfd3ed546c067376fcb36b435b48
http://b/3180373
|
|
|
|
|
|
|
|
| |
This makes it easy for us to change how we store HTTP cache
data without fear of compatibility problems.
Change-Id: I26cd6645d26f359ab76e2f87b6ab73bbf24ab715
http://b/3180373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than strictly trackign what's convenient for implementation,
we now provide stats based on what we anticipate the user will want
to know:
- how many requests were made?
- how many requests required network use?
- how many requests were served by the cache?
This doesn't provide individual stats on how many conditional gets
were made, but those can be computed.
Change-Id: Ieeebaf8b98664e78f828971052404dd7da28ad78
http://b/3180373
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also capture FDs rather than InputStreams when a cache
entry is read. This permits the cache to return as many
streams as the caller requires.
Also fix bugs where we weren't properly releasing the
input streams from the responses.
Change-Id: I04807eab648864229f1e8734ad1fbb6a2d6bb51d
http://b/3180373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Break HttpURLConnectionImpl into two parts: the part that
implements the Java API (that follows redirects etc.) and
the part that speaks HTTP. The HTTP part is called HttpEngine,
and it can only be used for a single HTTP request. This makes
it easier to set request properties that only apply to a
single socket request.
Tests for 'Vary', 'Content-Location' and warnings.
For simplicity of implementation I've chosen not to support
'Vary' at this time.
The 'Content-Location' header doesn't require any work from
the cache.
Warnings are ugly but allow the caller to identify when the
cache results may be problematic.
Also breaking HttpResponseCache's dependency on HttpURLConnectionImpl
so it can be tested on the RI.
Change-Id: Idbabb51251f479c2cdea4e0fceb029bfd07182be
http://b/3180373
|
|
|
|
|
|
|
|
| |
Fix suspicious use of the word 'header' in the HttpURLConnectionImpl.
Use 'header field' and 'headers' as necessary.
Change-Id: I502808005a727772091e5770a517d3170e102549
http://b/3180373
|
|
|
|
|
| |
Change-Id: I7ecfa49078d131ff90031fd44698290f8b170cd7
http://b/3180373
|
|
|
|
|
|
|
|
|
|
|
| |
Neither of these are particularly pretty. Authorization is a
silly special case in the spec that makes caching opt-in rather
than opt-out. Default expiration dates are reasonable but require
a hack to not cache get queries like http://foo.com/?q=bar.
http://b/3180373
Change-Id: Ica76ccfde30fe1e7a0d64895ef5370b43bd980ec
|
|
Change-Id: Ie2b4c76ac97cc7a4783bd6a695cfb28f7ea2296f
http://b/3180373
|