Home
last modified time | relevance | path

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

12

/wasmtime-44.0.1/crates/wasi-http/src/p2/
H A Dtypes.rs22 headers: &mut http::HeaderMap, in remove_forbidden_headers()
33 headers.remove(&name); in remove_forbidden_headers()
99 pub(crate) headers: FieldMap, field
126 None => match parts.headers.get(http::header::HOST) { in new_incoming_request()
132 remove_forbidden_headers(self.hooks, &mut parts.headers); in new_incoming_request()
133 let headers = FieldMap::new_immutable(parts.headers); in new_incoming_request() localVariable
138 headers, in new_incoming_request()
172 pub headers: FieldMap, field
187 *builder.headers_mut().unwrap() = resp.headers.into(); in try_from()
212 pub headers: FieldMap, field
[all …]
H A Dtypes_impl.rs192 fn headers( in headers() method
224 headers: Resource<FieldMap>, in new()
226 let mut headers = self.table.delete(headers)?; in new() localVariable
227 headers.set_immutable(); in new()
234 headers, in new()
378 fn headers( in headers() method
439 fn headers( in headers() method
556 headers: fields, in new()
612 fn headers( in headers() method
660 let headers = FieldMap::new_immutable(parts.headers); in get() localVariable
[all …]
/wasmtime-44.0.1/crates/test-programs/src/
H A Dhttp.rs8 pub headers: Vec<(String, Vec<u8>)>, field
15 .field("headers", &self.headers); in fmt()
27 self.headers in header()
47 let headers = http_types::Headers::from_list( in request() localVariable
58 let request = http_types::OutgoingRequest::new(headers); in request()
145 let headers_handle = incoming_response.headers(); in request()
146 let headers = headers_handle.entries(); in request() localVariable
175 headers, in request()
/wasmtime-44.0.1/crates/test-programs/src/bin/
H A Dp3_http_middleware.rs53 let headers = request.get_headers(); in handle() localVariable
54 let mut headers = headers.copy_all(); in handle() localVariable
55 headers.retain(|(k, v)| match (k.as_str(), v.as_slice()) { in handle()
111 Headers::from_list(&headers).unwrap(), in handle()
127 let mut headers = response.get_headers().copy_all(); in handle() localVariable
129 headers.push(("content-encoding".into(), b"deflate".into())); in handle()
135 headers.retain(|(name, _value)| name != "content-length"); in handle()
175 Response::new(Headers::from_list(&headers).unwrap(), Some(body), trailers); in handle()
H A Dp2_http_outbound_request_response_build.rs6 let headers = http_types::Headers::from_list(&[( in main() localVariable
11 let request = http_types::OutgoingRequest::new(headers); in main()
30 let headers = http_types::Headers::from_list(&[( in main() localVariable
35 let response = http_types::OutgoingResponse::new(headers); in main()
H A Dp3_http_echo.rs17 let headers = request.get_headers(); in handle() localVariable
21 let (response, _result) = if headers in handle()
27 Response::new(headers, Some(body), trailers) in handle()
55 Response::new(headers, Some(pipe_rx), trailers_rx) in handle()
H A Dp3_http_outbound_request_response_build.rs12 let headers = Headers::from_list(&[( in run() localVariable
19 let (request, _) = Request::new(headers, Some(contents_rx), trailers_rx, None); in run()
33 let headers = Headers::from_list(&[( in run() localVariable
40 let _ = Response::new(headers, Some(contents_rx), trailers_rx); in run()
H A Dp2_cli_serve_echo_env.rs12 let headers = request.headers(); in handle() localVariable
14 let env_var = headers.get(&header_key); in handle()
H A Dp2_api_proxy.rs48 let req_hdrs = request.headers(); in handle()
105 fn add_bytes_to_headers(headers: Headers, size: usize) { in add_bytes_to_headers()
109 headers.append("k", &b"abcdefghi"[0..size - 1]).unwrap() in add_bytes_to_headers()
119 headers.append(k.as_str(), v.as_bytes()).unwrap() in add_bytes_to_headers()
130 add_bytes_to_headers(request.headers().clone(), added_field_bytes); in modify_fields_handler()
H A Dp3_http_proxy.rs20 let headers = request.get_headers().copy_all(); in handle() localVariable
22 if let Some(url) = headers.iter().find_map(|(k, v)| { in handle()
H A Dp2_api_proxy_streaming.rs24 let headers = request.headers().entries(); in handle_request() localVariable
33 let urls = headers.iter().filter_map(|(k, v)| { in handle_request()
74 &headers in handle_request()
109 if let Some(url) = headers.iter().find_map(|(k, v)| { in handle_request()
123 &headers in handle_request()
H A Dp2_api_proxy_forward_request.rs24 let hdrs = Headers::from_list(&res.headers).unwrap(); in handle()
H A Dp2_http_outbound_request_invalid_header.rs61 let hdrs = req.headers(); in main()
/wasmtime-44.0.1/crates/test-programs/src/p3/
H A Dhttp.rs10 pub headers: Vec<(String, Vec<u8>)>, field
18 .field("headers", &self.headers); in fmt()
31 self.headers in header()
51 let headers = types::Headers::from_list( in request() localVariable
76 types::Request::new(headers, Some(contents_rx), trailers_rx, Some(options)); in request()
96 let headers = response.get_headers().copy_all(); in request() localVariable
115 headers, in request()
/wasmtime-44.0.1/crates/wasi-http/src/p3/
H A Dresponse.rs17 pub headers: FieldMap, field
28 headers,
33 *res.headers_mut().unwrap() = headers.into();
71 get_content_length(&res.headers).context("failed to parse `content-length`")?; in into_http_with_getter()
108 headers: FieldMap::new_immutable(parts.headers), in from_http()
145 wasi_resp.headers.get("x-custom-header").unwrap(), in test_response_from_http()
H A Drequest.rs39 pub headers: FieldMap, field
58 headers: impl Into<FieldMap>, in new()
72 headers: headers.into(), in new()
106 headers, in from_http()
122 FieldMap::new_immutable(headers), in from_http()
159 mut headers, in into_http_with_getter()
164 let content_length = match get_content_length(&headers) { in into_http_with_getter()
212 headers.set_mutable(ctx.field_size_limit); in into_http_with_getter()
220 headers.append(HOST, host).map_err(HttpError::trap)?; in into_http_with_getter()
239 *req.headers_mut().unwrap() = headers.into(); in into_http_with_getter()
/wasmtime-44.0.1/crates/wasi-http/wit/deps/
H A Dhttp.wit5 /// their headers, trailers, and bodies.
159 /// `incoming-request.headers`, `outgoing-request.headers`) might be
241 type headers = fields;
271 headers: func() -> headers;
292 constructor(headers: headers);
337 /// Get the headers associated with the Request.
346 headers: func() -> headers;
403 send-informational: func(status: u16, headers: headers) -> result<_, error-code>;
435 headers: func() -> headers;
519 constructor(headers: headers);
[all …]
/wasmtime-44.0.1/crates/wasi-http/src/
H A Dlib.rs31 fn get_content_length(headers: &http::HeaderMap) -> wasmtime::Result<Option<u64>> { in get_content_length()
32 let Some(v) = headers.get(header::CONTENT_LENGTH) else { in get_content_length()
/wasmtime-44.0.1/crates/wasi-http/src/p3/host/
H A Dtypes.rs312 headers: Resource<Headers>, in new()
337 let headers = delete_fields(table, headers)?; in new() localVariable
346 headers, in new()
493 let Request { headers, .. } = get_request(self.table, &req)?; in get_headers()
494 push_fields(self.table, headers.clone()) in get_headers()
595 headers: Resource<Headers>, in new()
619 let headers = delete_fields(table, headers)?; in new() localVariable
622 headers, in new()
684 let Response { headers, .. } = get_response(self.table, &res)?; in get_headers()
685 push_fields(self.table, headers.clone()) in get_headers()
H A Dhandler.rs77 status, headers, .. in send()
101 headers: FieldMap::new_immutable(headers), in send()
/wasmtime-44.0.1/crates/wasi-http/src/p3/wit/deps/
H A Dhttp.wit4 /// Requests and Responses, as well as their headers, trailers, and bodies.
169 /// `request.headers`) might be be immutable. In an immutable fields, the
258 type headers = fields;
270 /// `headers` is the HTTP Headers for the Request.
283 /// and `authority`, or `headers` which are not permitted to be sent.
326 /// Get the headers associated with the Request.
330 get-headers: func() -> headers;
391 /// `headers` is the HTTP Headers for the Response.
400 …new: static func(headers: headers, contents: option<stream<u8>>, trailers: future<result<option<tr…
406 /// Get the headers associated with the Response.
[all …]
/wasmtime-44.0.1/crates/c-api/tests/
H A DCMakeLists.txt61 # Create a list of all wasmtime headers with `GLOB_RECURSE`, then emit a file
67 # it does test that all headers compile in isolation at least. Not perfect but
86 add_capi_test(standalone-headers FILES ${header_tests})
/wasmtime-44.0.1/crates/c-api/
H A DREADME.md44 of the C API. Its located next to the C headers when you download a pre-built
58 … file, when compiling your C/C++ source code, add the C `wasmtime-c-api` headers to the include pa…
64 // Add to the include path the wasmtime headers and the standard
65 // Wasm C API headers.
/wasmtime-44.0.1/ci/
H A Dvendor-c-api-headers.sh19 // ./ci/vendor-c-api-headers.sh shell script.
/wasmtime-44.0.1/
H A DREADME.md142 * **[C]** - the [`wasm.h`, `wasi.h`, and `wasmtime.h` headers][c-headers], [CMake](crates/c-api/CMa…
143 * **C++** - the [`wasmtime.hh` header][c-headers]
157 [c-headers]: https://bytecodealliance.github.io/wasmtime/c-api/

12