Home
last modified time | relevance | path

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

12345678910>>...32

/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/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/
DHeadersTest.java47 Headers headers = response.headers(); in parseNameValueBlock() local
48 assertEquals(4, headers.size()); in parseNameValueBlock()
52 assertEquals("no-cache, no-store", headers.get("cache-control")); in parseNameValueBlock()
53 assertEquals("Cookie2", headers.get("set-cookie")); in parseNameValueBlock()
54 assertEquals(Protocol.SPDY_3.toString(), headers.get(OkHeaders.SELECTED_PROTOCOL)); in parseNameValueBlock()
55 assertEquals(OkHeaders.SELECTED_PROTOCOL, headers.name(0)); in parseNameValueBlock()
56 assertEquals(Protocol.SPDY_3.toString(), headers.value(0)); in parseNameValueBlock()
57 assertEquals("cache-control", headers.name(1)); in parseNameValueBlock()
58 assertEquals("no-cache, no-store", headers.value(1)); in parseNameValueBlock()
59 assertEquals("set-cookie", headers.name(2)); in parseNameValueBlock()
[all …]
/external/chromium-trace/trace-viewer/third_party/Paste/paste/
Dhttpexceptions.py176 def __init__(self, detail=None, headers=None, comment=None): argument
178 assert isinstance(headers, (type(None), list)), (
180 % headers)
185 self.headers = headers or tuple()
187 assert headers and has_header(headers, req), (
190 % (self.__class__.__name__, req, headers))
206 if self.headers:
207 for (k, v) in self.headers:
230 if self.headers:
231 headers = list(self.headers)
[all …]
Dresponse.py88 def has_header(headers, name): argument
93 for header, value in headers:
98 def header_value(headers, name): argument
115 result = [value for header, value in headers
122 def remove_header(headers, name): argument
131 while i < len(headers):
132 if headers[i][0].lower() == name:
133 result = headers[i][1]
134 del headers[i]
139 def replace_header(headers, name, value): argument
[all …]
Dfileapp.py59 def __init__(self, content, headers=None, allowed_methods=None, argument
61 assert isinstance(headers, (type(None), list))
68 self.headers = headers or []
71 header.update(self.headers, v)
72 ACCEPT_RANGES.update(self.headers, bytes=True)
73 if not CONTENT_TYPE(self.headers):
74 CONTENT_TYPE.update(self.headers)
79 self.expires = CACHE_CONTROL.apply(self.headers, **kwargs) or None
90 LAST_MODIFIED.update(self.headers, time=self.last_modified)
94 CONTENT_DISPOSITION.apply(self.headers, **kwargs)
[all …]
Dgzipper.py49 def gzip_start_response(self, status, headers, exc_info=None): argument
50 self.headers = headers
51 ct = header_value(headers,'content-type')
52 ce = header_value(headers,'content-encoding')
60 headers.append(('content-encoding', 'gzip'))
61 remove_header(headers, 'content-length')
62 self.headers = headers
88 CONTENT_LENGTH.update(self.headers, content_length)
89 self.start_response(self.status, self.headers)
Dproxy.py81 headers = {}
87 headers[key] = value
88 headers['host'] = self.host
90 headers['x-forwarded-for'] = environ['REMOTE_ADDR']
92 headers['content-type'] = environ['CONTENT_TYPE']
97 headers['content-length'] = str(len(body))
99 headers['content-length'] = environ['CONTENT_LENGTH']
119 body, headers)
207 headers = {}
211 headers[key] = value
[all …]
Derrordocument.py65 def __init__(self, app, status, url, headers): argument
69 self.headers = headers
72 def keep_status_start_response(status, headers, exc_info=None): argument
73 for header, value in headers:
75 self.headers.append((header, value))
77 replace_header(self.headers, header, value)
78 return start_response(self.status, self.headers, exc_info)
172 def change_response(status, headers, exc_info=None): argument
195 url.append([new_url, status, headers])
200 return start_response(status, headers, exc_info)
[all …]
Dflup_session.py78 def cookie_start_response(status, headers, exc_info=None): argument
79 service.addCookie(headers)
80 return start_response(status, headers, exc_info)
85 headers = (e.headers or {}).items()
86 service.addCookie(headers)
87 e.headers = dict(headers)
/external/robolectric/src/main/java/com/xtremelabs/robolectric/tester/org/apache/http/
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(), 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/chromium-trace/trace-viewer/third_party/Paste/tests/
Dtest_httpheaders.py63 headers = []
64 CACHE_CONTROL.apply(headers,max_age=60)
65 assert 'public, max-age=60' == CACHE_CONTROL(headers)
66 assert EXPIRES.parse(headers) > time.time()
67 assert EXPIRES.parse(headers) < time.time() + 60
77 headers = []
78 CONTENT_DISPOSITION.apply(headers,filename="test.txt")
79 assert 'text/plain' == CONTENT_TYPE(headers)
80 CONTENT_DISPOSITION.apply(headers,filename="test")
81 assert 'text/plain' == CONTENT_TYPE(headers)
[all …]
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/
DRequest.java34 private final Headers headers; field in Request
45 this.headers = builder.headers.build(); in Request()
77 public Headers headers() { in headers() method in Request
78 return headers; in headers()
82 return headers.get(name); in header()
85 public List<String> headers(String name) { in headers() method in Request
86 return headers.values(name); in headers()
107 return result != null ? result : (cacheControl = CacheControl.parse(headers)); in cacheControl()
128 private Headers.Builder headers; field in Request.Builder
134 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/chromium-trace/trace-viewer/third_party/webapp2/tests/
Dresponse_test.py122 def write(status, headers, body): argument
123 return res.extend([status, headers, body])
125 def start_response(status, headers): argument
126 return lambda body: write(status, headers, body)
131 rsp = webapp2.Response(status=res[0], body=res[2], headers=res[1])
151 rsp.headers.add('Set-Cookie', 'foo=bar;')
152 rsp.headers.add('Set-Cookie', 'baz=ding;')
154 self.assertEqual(rsp.headers.get_all('set-cookie'),
158 rsp.headers = {'Set-Cookie': 'foo=bar;'}
159 self.assertEqual(rsp.headers.get_all('set-cookie'), ['foo=bar;'])
[all …]
Dextras_appengine_sessions_ndb_test.py48 cookies = rsp.headers.get('Set-Cookie')
49 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
65 cookies = rsp.headers.get('Set-Cookie')
66 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
82 cookies = rsp.headers.get('Set-Cookie')
83 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
111 cookies = rsp.headers.get('Set-Cookie')
112 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
132 cookies = rsp.headers.get('Set-Cookie')
133 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
[all …]
Dextras_appengine_sessions_memcache_test.py41 cookies = rsp.headers.get('Set-Cookie')
42 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
58 cookies = rsp.headers.get('Set-Cookie')
59 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
87 cookies = rsp.headers.get('Set-Cookie')
88 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
108 cookies = rsp.headers.get('Set-Cookie')
109 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
126 cookies = rsp.headers.get('Set-Cookie')
127 req = webapp2.Request.blank('/', headers=[('Cookie', cookies)])
/external/icu/icu4c/source/test/perf/perldriver/
DOutput.pm18 my @headers;
94 if($#headers >= 0) {
101 print HTML "<th colspan=".((4*($#headers+1))-2)." class=\"sourceType\">Per Operation</th>\n";
103 print HTML "<th colspan=".((2*($#headers+1))-2)." class=\"sourceType\">Per Operation</th>\n";
104 print HTML "<th colspan=".((5*($#headers+1))-2)." class=\"sourceType\">Per Event</th>\n";
108 foreach $header (@headers) {
113 for $i (1 .. $#headers) {
115 …atio and error of per $operationIs time, calculated as: (($headers[0] - $headers[$i])/$headers[$i]…
118 foreach $header (@headers) {
122 foreach $header (@headers) {
[all …]
/external/nanohttpd/websocket/src/test/java/fi/iki/elonen/
DWebSocketResponseHandlerTest.java39 private Map<String, String> headers; field in WebSocketResponseHandlerTest
45 headers = new HashMap<String, String>(); in setUp()
46 headers.put("upgrade", "websocket"); in setUp()
47 headers.put("connection", "Upgrade"); in setUp()
48 headers.put("sec-websocket-key", "x3JJHMbDL1EzLkh9GBhXDw=="); in setUp()
49 headers.put("sec-websocket-protocol", "chat, superchat"); in setUp()
50 headers.put("sec-websocket-version", "13"); in setUp()
52 when(session.getHeaders()).thenReturn(headers); in setUp()
74 headers.put("sec-websocket-version", "12"); in testWrongWebsocketVersionReturnsErrorResponse()
84 headers.remove("sec-websocket-key"); in testMissingKeyReturnsErrorResponse()
[all …]
/external/nanohttpd/websocket/src/main/java/fi/iki/elonen/
DWebSocketResponseHandler.java30 Map<String, String> headers = session.getHeaders(); in serve() local
32 … if (!HEADER_WEBSOCKET_VERSION_VALUE.equalsIgnoreCase(headers.get(HEADER_WEBSOCKET_VERSION))) { in serve()
34 "Invalid Websocket-Version " + headers.get(HEADER_WEBSOCKET_VERSION)); in serve()
37 if (!headers.containsKey(HEADER_WEBSOCKET_KEY)) { in serve()
45 …handshakeResponse.addHeader(HEADER_WEBSOCKET_ACCEPT, makeAcceptKey(headers.get(HEADER_WEBSOCKET_KE… in serve()
51 if (headers.containsKey(HEADER_WEBSOCKET_PROTOCOL)) { in serve()
52 …handshakeResponse.addHeader(HEADER_WEBSOCKET_PROTOCOL, headers.get(HEADER_WEBSOCKET_PROTOCOL).spli… in serve()
62 Map<String, String> headers = session.getHeaders(); in isWebsocketRequested() local
63 String upgrade = headers.get(HEADER_UPGRADE); in isWebsocketRequested()
64 boolean isCorrectConnection = isWebSocketConnectionHeader(headers); in isWebsocketRequested()
[all …]
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/
DMockResponse.java30 private Headers.Builder headers = new Headers.Builder(); field in MockResponse
54 result.headers = headers.build().newBuilder(); in clone()
78 return headers.build(); in getHeaders()
86 headers = new Headers.Builder(); in clearHeaders()
95 headers.add(header); in addHeader()
104 headers.add(name, String.valueOf(value)); in addHeader()
118 public MockResponse setHeaders(Headers headers) { in setHeaders() argument
119 this.headers = headers.newBuilder(); in setHeaders()
125 headers.removeAll(name); in removeHeader()
151 headers.add(CHUNKED_BODY_HEADER); in setChunkedBody()
/external/chromium-trace/trace-viewer/perf_insights/third_party/cloudstorage/
Dstorage_api.py114 def do_request_async(self, url, method='GET', headers=None, payload=None, argument
120 if headers is None:
121 headers = {}
122 if 'x-goog-api-version' not in headers:
123 headers['x-goog-api-version'] = '2'
124 headers['accept-encoding'] = 'gzip, *'
127 url, method=method, headers=headers, payload=payload,
211 status, headers, content = self._api.head_object(path)
212 errors.check_status(status, [200], path, resp_headers=headers, body=content)
213 self._file_size = long(common.get_stored_content_length(headers))
[all …]
Drest_api.py159 def do_request_async(self, url, method='GET', headers=None, payload=None, argument
184 headers=headers,
189 raise ndb.Return((resp.status_code, resp.headers, resp.content))
222 def urlfetch_async(self, url, method='GET', headers=None, argument
242 headers = {} if headers is None else dict(headers)
243 headers.update(self.user_agent)
246 headers['authorization'] = 'OAuth ' + self.token
253 headers=headers, follow_redirects=follow_redirects,
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/
DRealResponseBody.java24 private final Headers headers; field in RealResponseBody
27 public RealResponseBody(Headers headers, BufferedSource source) { in RealResponseBody() argument
28 this.headers = headers; in RealResponseBody()
33 String contentType = headers.get("Content-Type"); in contentType()
38 return OkHeaders.contentLength(headers); in contentLength()
/external/chromium-trace/trace-viewer/third_party/Paste/paste/debug/
Dwdg_validate.py45 def writer_start_response(status, headers, exc_info=None): argument
46 response.extend((status, headers))
47 start_response(status, headers, exc_info)
58 status, headers = response
59 v = header_value(headers, 'content-type') or ''
74 headers.remove(
76 str(header_value(headers, 'content-length'))))
77 headers.append(('Content-Length', str(len(page))))
/external/webp/src/dec/
Dwebp.c291 WebPHeaderStructure* const headers) { in ParseHeadersInternal() argument
300 const int have_all_data = (headers != NULL) ? headers->have_all_data : 0; in ParseHeadersInternal()
341 headers == NULL) { in ParseHeadersInternal()
402 if (headers != NULL) { in ParseHeadersInternal()
403 *headers = hdrs; in ParseHeadersInternal()
404 headers->offset = data - headers->data; in ParseHeadersInternal()
405 assert((uint64_t)(data - headers->data) < MAX_CHUNK_PAYLOAD); in ParseHeadersInternal()
406 assert(headers->offset == headers->data_size - data_size); in ParseHeadersInternal()
410 (status == VP8_STATUS_NOT_ENOUGH_DATA && found_vp8x && headers == NULL)) { in ParseHeadersInternal()
424 VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers) { in WebPParseHeaders() argument
[all …]

12345678910>>...32