-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Description
When wws calls a worker, it sends the HTTP request as a serialized object. It includes all the required values to build a Request object inside the worker. Currently, the url does not include the query string. This is relevant information so we should ensure we send it as part of the URL.
wasm-workers-server/src/workers/wasm_io.rs
Lines 34 to 53 in a23438f
| pub fn new( | |
| request: &'a HttpRequest, | |
| body: &'a str, | |
| kv: Option<HashMap<String, String>>, | |
| ) -> Self { | |
| let mut params = HashMap::new(); | |
| for (k, v) in request.match_info().iter() { | |
| params.insert(k.to_string(), v.to_string()); | |
| } | |
| Self { | |
| url: request.uri().path(), | |
| method: request.method().as_str(), | |
| headers: Self::build_headers_hash(request.headers()), | |
| body, | |
| kv: kv.unwrap_or_default(), | |
| params, | |
| } | |
| } |
The .uri().path() method doesn't include the query string. There's an alternative path_and_query() path we can use for this purpose.
Metadata
Metadata
Assignees
Labels
🐛 bugSomething isn't workingSomething isn't working