Add fields.has to query if a header is present in a fields#7625
Merged
elliottt merged 4 commits intoDec 5, 2023
Conversation
alexcrichton
approved these changes
Dec 4, 2023
Member
alexcrichton
left a comment
There was a problem hiding this comment.
Looks reasonable to me, but @pchickey should sign-off on this as well
Member
|
Also, should this also be sent upstream to WebAssembly/wasi-http? |
Member
Author
Yes, I'll make that pr as well. Thanks! |
Member
Author
|
Upstream pr: WebAssembly/wasi-http#91 |
fields.get return an optionfields.has to query if a header is present in a fields
b0ccc7b to
be26628
Compare
pchickey
approved these changes
Dec 5, 2023
pchickey
approved these changes
Dec 5, 2023
| /// Set the timeout for the initial connect to the HTTP Server. An error | ||
| /// return value indicates that this timeout is not supported. | ||
| set-connect-timeout: func(duration: option<duration>) -> result; | ||
| set-connect-timeout: func(ms: option<duration>) -> result; |
Contributor
There was a problem hiding this comment.
lets not pull these ms names from upstream and instead fix those upstream?
Member
Author
There was a problem hiding this comment.
Whoops, thanks for catching this!
elliottt
added a commit
to elliottt/wasmtime
that referenced
this pull request
Dec 6, 2023
…odealliance#7625) * Make `fields.get` return an option * Add `fields.has` * Sync with the upstream wasi-http types.wit * Revert changes to rename duration to ms
alexcrichton
pushed a commit
that referenced
this pull request
Dec 6, 2023
#7641) * Make `fields.get` return an option * Add `fields.has` * Sync with the upstream wasi-http types.wit * Revert changes to rename duration to ms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in WebAssembly/wasi-http#82, it would be nice to be able to know when a header value exists, vs when it's empty.