Home
last modified time | relevance | path

Searched refs:headers (Results 1 – 25 of 2139) sorted by relevance

12345678910>>...86

/external/apache-http/src/org/apache/http/message/
DHeaderGroup.java59 private List headers; field in HeaderGroup
65 this.headers = new ArrayList(16); in HeaderGroup()
72 headers.clear(); in clear()
85 headers.add(header); in addHeader()
97 headers.remove(header); in removeHeader()
111 for (int i = 0; i < this.headers.size(); i++) { in updateHeader()
112 Header current = (Header) this.headers.get(i); in updateHeader()
114 this.headers.set(i, header); in updateHeader()
118 this.headers.add(header); in updateHeader()
128 public void setHeaders(Header[] headers) { in setHeaders() argument
[all …]
/external/volley/src/test/java/com/android/volley/toolbox/
DHttpHeaderParserTest.java49 private Map<String, String> headers; field in HttpHeaderParserTest
53 headers = new HashMap<String, String>(); in setUp()
54 response = new NetworkResponse(0, null, headers, false); in setUp()
71 headers.put("MyCustomHeader", "42"); in parseCacheHeaders_headersSet()
83 headers.put("ETag", "Yow!"); in parseCacheHeaders_etag()
94 headers.put("Date", rfc1123Date(now)); in parseCacheHeaders_normalExpire()
95 headers.put("Last-Modified", rfc1123Date(now - ONE_DAY_MILLIS)); in parseCacheHeaders_normalExpire()
96 headers.put("Expires", rfc1123Date(now + ONE_HOUR_MILLIS)); in parseCacheHeaders_normalExpire()
111 headers.put("Date", rfc1123Date(now)); in parseCacheHeaders_expiresInPast()
112 headers.put("Expires", rfc1123Date(now - ONE_HOUR_MILLIS)); in parseCacheHeaders_expiresInPast()
[all …]
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/
DHeadersTest.java45 Headers headers = response.headers(); in parseNameValueBlock() local
46 assertEquals(3, headers.size()); in parseNameValueBlock()
50 assertEquals("no-cache, no-store", headers.get("cache-control")); in parseNameValueBlock()
51 assertEquals("Cookie2", headers.get("set-cookie")); in parseNameValueBlock()
52 assertEquals("cache-control", headers.name(0)); in parseNameValueBlock()
53 assertEquals("no-cache, no-store", headers.value(0)); in parseNameValueBlock()
54 assertEquals("set-cookie", headers.name(1)); in parseNameValueBlock()
55 assertEquals("Cookie1", headers.value(1)); in parseNameValueBlock()
56 assertEquals("set-cookie", headers.name(2)); in parseNameValueBlock()
57 assertEquals("Cookie2", headers.value(2)); in parseNameValueBlock()
[all …]
/external/python/oauth2client/oauth2client/
Dtransport.py70 def _initialize_headers(headers): argument
80 return {} if headers is None else dict(headers)
83 def _apply_user_agent(headers, user_agent): argument
96 if 'user-agent' in headers:
97 headers['user-agent'] = (user_agent + ' ' + headers['user-agent'])
99 headers['user-agent'] = user_agent
101 return headers
104 def clean_headers(headers): argument
119 for k, v in six.iteritems(headers):
147 def new_request(uri, method='GET', body=None, headers=None, argument
[all …]
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/
DGrpcHttp2InboundHeadersTest.java43 Http2Headers headers = new GrpcHttp2RequestHeaders(1); in basicCorrectness() local
44 headers.add(of(":method"), of("POST")); in basicCorrectness()
45 headers.add(of("content-type"), of("application/grpc+proto")); in basicCorrectness()
46 headers.add(of(":path"), of("/google.pubsub.v2.PublisherService/CreateTopic")); in basicCorrectness()
47 headers.add(of(":scheme"), of("https")); in basicCorrectness()
48 headers.add(of("te"), of("trailers")); in basicCorrectness()
49 headers.add(of(":authority"), of("pubsub.googleapis.com")); in basicCorrectness()
50 headers.add(of("foo"), of("bar")); in basicCorrectness()
52 assertEquals(7, headers.size()); in basicCorrectness()
54 assertEquals(2, ((GrpcHttp2InboundHeaders)headers).numHeaders()); in basicCorrectness()
[all …]
/external/python/oauth2client/tests/
Dtest_transport.py64 headers = {'a': 1, 'b': 2}
65 result = transport._initialize_headers(headers)
66 self.assertEqual(result, headers)
67 self.assertIsNot(result, headers)
73 headers = object()
74 result = transport._apply_user_agent(headers, None)
75 self.assertIs(result, headers)
78 headers = {}
80 result = transport._apply_user_agent(headers, user_agent)
81 self.assertIs(result, headers)
[all …]
Dhttp_mock.py25 def __init__(self, headers=None): argument
31 if headers is None:
32 headers = {'status': '200'}
34 self.response_headers = headers
35 self.headers = None
39 self.headers = None
44 headers=None, argument
50 self.headers = headers
89 headers=None, argument
93 self.requests.append({'uri': uri, 'body': body, 'headers': headers})
[all …]
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DHttp2ClientStreamTransportStateTest.java77 Metadata headers = new Metadata(); in transportHeadersReceived_notifiesListener() local
78 headers.put(testStatusMashaller, "200"); in transportHeadersReceived_notifiesListener()
79 headers.put(Metadata.Key.of("content-type", Metadata.ASCII_STRING_MARSHALLER), in transportHeadersReceived_notifiesListener()
81 state.transportHeadersReceived(headers); in transportHeadersReceived_notifiesListener()
84 verify(mockListener).headersRead(headers); in transportHeadersReceived_notifiesListener()
91 Metadata headers = new Metadata(); in transportHeadersReceived_doesntRequire200() local
92 headers.put(testStatusMashaller, "500"); in transportHeadersReceived_doesntRequire200()
93 headers.put(Metadata.Key.of("content-type", Metadata.ASCII_STRING_MARSHALLER), in transportHeadersReceived_doesntRequire200()
95 state.transportHeadersReceived(headers); in transportHeadersReceived_doesntRequire200()
98 verify(mockListener).headersRead(headers); in transportHeadersReceived_doesntRequire200()
[all …]
/external/volley/src/main/java/com/android/volley/
DNetworkResponse.java45 Map<String, String> headers, in NetworkResponse() argument
48 this(statusCode, data, headers, toAllHeaderList(headers), notModified, networkTimeMs); in NetworkResponse()
82 int statusCode, byte[] data, Map<String, String> headers, boolean notModified) { in NetworkResponse() argument
83 this(statusCode, data, headers, notModified, /* networkTimeMs= */ 0); in NetworkResponse()
110 public NetworkResponse(byte[] data, Map<String, String> headers) { in NetworkResponse() argument
114 headers, in NetworkResponse()
122 Map<String, String> headers, in NetworkResponse() argument
128 this.headers = headers; in NetworkResponse()
153 public final Map<String, String> headers; field in NetworkResponse
171 Map<String, String> headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); in toHeaderMap() local
[all …]
/external/webrtc/webrtc/examples/peerconnection/server/
Ddata_socket.cc178 const char* headers = request_headers_.data() + i + 2; in ParseHeaders() local
180 if (!ParseContentLengthAndType(headers, len)) in ParseHeaders()
224 bool DataSocket::ParseContentLengthAndType(const char* headers, size_t length) { in ParseContentLengthAndType() argument
228 const char* end = headers + length; in ParseContentLengthAndType()
229 while (headers && headers < end) { in ParseContentLengthAndType()
230 if (!isspace(headers[0])) { in ParseContentLengthAndType()
233 if ((headers + ARRAYSIZE(kContentLength)) < end && in ParseContentLengthAndType()
234 strncmp(headers, kContentLength, in ParseContentLengthAndType()
236 headers += ARRAYSIZE(kContentLength) - 1; in ParseContentLengthAndType()
237 while (headers[0] == ' ') in ParseContentLengthAndType()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/AMDGPU/
Delf-header-flags-mach.ll1 ; RUN: llc -filetype=obj -march=r600 -mcpu=r600 < %s | llvm-readobj -file-headers - | FileCheck --c…
2 ; RUN: llc -filetype=obj -march=r600 -mcpu=r630 < %s | llvm-readobj -file-headers - | FileCheck --c…
3 ; RUN: llc -filetype=obj -march=r600 -mcpu=rs880 < %s | llvm-readobj -file-headers - | FileCheck --…
4 ; RUN: llc -filetype=obj -march=r600 -mcpu=rv670 < %s | llvm-readobj -file-headers - | FileCheck --…
5 ; RUN: llc -filetype=obj -march=r600 -mcpu=rv710 < %s | llvm-readobj -file-headers - | FileCheck --…
6 ; RUN: llc -filetype=obj -march=r600 -mcpu=rv730 < %s | llvm-readobj -file-headers - | FileCheck --…
7 ; RUN: llc -filetype=obj -march=r600 -mcpu=rv770 < %s | llvm-readobj -file-headers - | FileCheck --…
8 ; RUN: llc -filetype=obj -march=r600 -mcpu=cedar < %s | llvm-readobj -file-headers - | FileCheck --…
9 ; RUN: llc -filetype=obj -march=r600 -mcpu=cypress < %s | llvm-readobj -file-headers - | FileCheck …
10 ; RUN: llc -filetype=obj -march=r600 -mcpu=juniper < %s | llvm-readobj -file-headers - | FileCheck …
[all …]
/external/python/google-api-python-client/tests/
Dtest_json_model.py44 headers = {}
49 headers, unused_params, query, body = model.request(
50 headers, path_params, query_params, body)
52 self.assertEqual(headers['accept'], 'application/json')
53 self.assertTrue('content-type' not in headers)
60 headers = {}
65 headers, unused_params, query, body = model.request(
66 headers, path_params, query_params, body)
68 self.assertEqual(headers['accept'], 'application/json')
69 self.assertEqual(headers['content-type'], 'application/json')
[all …]
/external/robolectric-shadows/shadows/httpclient/src/main/java/org/robolectric/shadows/httpclient/
DTestHttpResponse.java29 private Header[] headers = new Header[0]; field in TestHttpResponse
42 public TestHttpResponse(int statusCode, String responseBody, Header... headers) { in TestHttpResponse() argument
43 this(statusCode, responseBody.getBytes(UTF_8), headers); in TestHttpResponse()
46 public TestHttpResponse(int statusCode, byte[] responseBody, Header... headers) { in TestHttpResponse() argument
49 this.headers = headers; in TestHttpResponse()
65 return headers; in getAllHeaders()
69 for (Header h : headers) { in getFirstHeader()
78 for (int i = headers.length -1; i >= 0; i--) { in getLastHeader()
79 if (headers[i].getName().equalsIgnoreCase(s)) { in getLastHeader()
80 return headers[i]; in getLastHeader()
[all …]
/external/python/httplib2/tests/
Dtest_cache.py17 uri, "GET", headers={"cache-control": "only-if-cached"}
28 uri, "GET", headers={"cache-control": "only-if-cached"}
42 uri, "GET", headers={"cache-control": "only-if-cached"}
73 headers={"vary": "Accept", "cache-control": "max-age=300"}, add_date=True
76 response, content = http.request(uri, "GET", headers={"accept": "text/plain"})
82 response, content = http.request(uri, "GET", headers={"Accept": "text/plain"})
87 response, content = http.request(uri, "GET", headers={"Accept": "text/html"})
100 headers={"vary": "Accept, Accept-Language", "cache-control": "max-age=300"},
107 headers={
119 headers={
[all …]
/external/libbrillo/brillo/http/
Dhttp_utils.cc25 const HeaderList& headers, in GetAndBlock() argument
29 request_type::kGet, url, headers, transport, error); in GetAndBlock()
33 const HeaderList& headers, in Get() argument
39 headers, in Get()
67 const HeaderList& headers, in PostTextAndBlock() argument
71 url, data.data(), data.size(), mime_type, headers, transport, error); in PostTextAndBlock()
77 const HeaderList& headers, in PostText() argument
85 headers, in PostText()
97 const HeaderList& headers, in SendRequestAndBlock() argument
101 request.AddHeaders(headers); in SendRequestAndBlock()
[all …]
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/
DSendResponseHeadersCommand.java29 private final Http2Headers headers; field in SendResponseHeadersCommand
32 private SendResponseHeadersCommand(StreamIdHolder stream, Http2Headers headers, Status status) { in SendResponseHeadersCommand() argument
34 this.headers = Preconditions.checkNotNull(headers, "headers"); in SendResponseHeadersCommand()
38 static SendResponseHeadersCommand createHeaders(StreamIdHolder stream, Http2Headers headers) { in createHeaders() argument
39 return new SendResponseHeadersCommand(stream, headers, null); in createHeaders()
43 StreamIdHolder stream, Http2Headers headers, Status status) { in createTrailers() argument
45 stream, headers, Preconditions.checkNotNull(status, "status")); in createTrailers()
52 Http2Headers headers() { in headers() method in SendResponseHeadersCommand
53 return headers; in headers()
71 && thatCmd.headers.equals(headers) in equals()
[all …]
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/
DRequest.java31 private final Headers headers; field in Request
42 this.headers = builder.headers.build(); in Request()
73 public Headers headers() { in headers() method in Request
74 return headers; in headers()
78 return headers.get(name); in header()
81 public List<String> headers(String name) { in headers() method in Request
82 return headers.values(name); in headers()
103 return result != null ? result : (cacheControl = CacheControl.parse(headers)); in cacheControl()
123 private Headers.Builder headers; field in Request.Builder
129 this.headers = new Headers.Builder(); in Builder()
[all …]
DResponse.java42 private final Headers headers; field in Response
56 this.headers = builder.headers.build(); in Response()
112 public List<String> headers(String name) { in headers() method in Response
113 return headers.values(name); in headers()
121 String result = headers.get(name); in header()
125 public Headers headers() { in headers() method in Response
126 return headers; in headers()
197 return OkHeaders.parseChallenges(headers(), responseField); in challenges()
206 return result != null ? result : (cacheControl = CacheControl.parse(headers)); in cacheControl()
227 private Headers.Builder headers; field in Response.Builder
[all …]
/external/grpc-grpc-java/core/src/test/java/io/grpc/
DServerInterceptorsTest.java70 private final Metadata headers = new Metadata(); field in ServerInterceptorsTest
128 getSoleMethod(intercepted).getServerCallHandler().startCall(call, headers)); in multipleInvocationsOfHandler()
129 verify(interceptor).interceptCall(same(call), same(headers), anyCallHandler()); in multipleInvocationsOfHandler()
130 verify(handler).startCall(call, headers); in multipleInvocationsOfHandler()
134 getSoleMethod(intercepted).getServerCallHandler().startCall(call, headers)); in multipleInvocationsOfHandler()
136 .interceptCall(same(call), same(headers), anyCallHandler()); in multipleInvocationsOfHandler()
137 verify(handler, times(2)).startCall(call, headers); in multipleInvocationsOfHandler()
153 getMethod(intercepted, "basic/flow").getServerCallHandler().startCall(call, headers); in correctHandlerCalled()
154 verify(handler).startCall(call, headers); in correctHandlerCalled()
158 getMethod(intercepted, "basic/flow2").getServerCallHandler().startCall(call, headers); in correctHandlerCalled()
[all …]
/external/python/cpython2/Lib/distutils/command/
Dconfig.py112 def _gen_temp_sourcefile(self, body, headers, lang): argument
115 if headers:
116 for header in headers:
125 def _preprocess(self, body, headers, include_dirs, lang): argument
126 src = self._gen_temp_sourcefile(body, headers, lang)
132 def _compile(self, body, headers, include_dirs, lang): argument
133 src = self._gen_temp_sourcefile(body, headers, lang)
141 def _link(self, body, headers, include_dirs, libraries, library_dirs, argument
143 (src, obj) = self._compile(body, headers, include_dirs, lang)
178 def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"): argument
[all …]
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/
DRequest.java36 private final Headers headers; field in Request
47 this.headers = builder.headers.build(); in Request()
78 public Headers headers() { in headers() method in Request
79 return headers; in headers()
83 return headers.get(name); in header()
86 public List<String> headers(String name) { in headers() method in Request
87 return headers.values(name); in headers()
108 return result != null ? result : (cacheControl = CacheControl.parse(headers)); in cacheControl()
131 private Headers.Builder headers; field in Request.Builder
137 this.headers = new Headers.Builder(); in Builder()
[all …]
DResponse.java48 private final Headers headers; field in Response
63 this.headers = builder.headers.build(); in Response()
119 public List<String> headers(String name) { in headers() method in Response
120 return headers.values(name); in headers()
128 String result = headers.get(name); in header()
132 public Headers headers() { in headers() method in Response
133 return headers; in headers()
204 return OkHeaders.parseChallenges(headers(), responseField); in challenges()
213 return result != null ? result : (cacheControl = CacheControl.parse(headers)); in cacheControl()
237 private Headers.Builder headers; field in Response.Builder
[all …]
/external/volley/src/main/java/com/android/volley/toolbox/
DHttpHeaderParser.java51 Map<String, String> headers = response.headers; in parseCacheHeaders() local
66 headerValue = headers.get("Date"); in parseCacheHeaders()
71 headerValue = headers.get("Cache-Control"); in parseCacheHeaders()
95 headerValue = headers.get("Expires"); in parseCacheHeaders()
100 headerValue = headers.get("Last-Modified"); in parseCacheHeaders()
105 serverEtag = headers.get("ETag"); in parseCacheHeaders()
125 entry.responseHeaders = headers; in parseCacheHeaders()
162 public static String parseCharset(Map<String, String> headers, String defaultCharset) { in parseCharset() argument
163 String contentType = headers.get(HEADER_CONTENT_TYPE); in parseCharset()
183 public static String parseCharset(Map<String, String> headers) { in parseCharset() argument
[all …]
/external/python/cpython3/Lib/distutils/command/
Dconfig.py107 def _gen_temp_sourcefile(self, body, headers, lang): argument
110 if headers:
111 for header in headers:
120 def _preprocess(self, body, headers, include_dirs, lang): argument
121 src = self._gen_temp_sourcefile(body, headers, lang)
127 def _compile(self, body, headers, include_dirs, lang): argument
128 src = self._gen_temp_sourcefile(body, headers, lang)
136 def _link(self, body, headers, include_dirs, libraries, library_dirs, argument
138 (src, obj) = self._compile(body, headers, include_dirs, lang)
173 def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"): argument
[all …]
/external/python/google-api-python-client/googleapiclient/
Dhttp.py653 for k, v in six.iteritems(request.headers):
679 headers = self._headers.copy()
680 headers['range'] = 'bytes=%d-%d' % (
686 'GET', headers=headers)
755 headers=None, argument
775 self.headers = headers or {}
827 if 'content-length' not in self.headers:
828 self.headers['content-length'] = str(self.body_size)
833 self.headers['x-http-method-override'] = 'GET'
834 self.headers['content-type'] = 'application/x-www-form-urlencoded'
[all …]

12345678910>>...86