Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasi-http: Make all setters fallible #7451

Merged

Conversation

elliottt
Copy link
Member

@elliottt elliottt commented Nov 2, 2023

Rename the header-error variant to validation-error, and use that variant as the error value for all setters of outbound-request and outbound-response. This ensures that we have the opportunity to validate outbound request and response values before they're given to their respective handlers.

Validation for uri components is done by using http:uri::Builder with only that value, ensuring that we don't raise an error. Validation for method and scheme is only done for the Other cases, and is accomplished by using the fallible parsers for each type from the http crate.

@elliottt elliottt requested a review from a team as a code owner November 2, 2023 02:44
@elliottt elliottt requested review from alexcrichton and pchickey and removed request for a team November 2, 2023 02:44
@elliottt elliottt force-pushed the trevor/validation-error-type branch 2 times, most recently from 885bc56 to 38ed925 Compare November 2, 2023 03:13
@github-actions github-actions bot added the wasi Issues pertaining to WASI label Nov 2, 2023
@elliottt elliottt force-pushed the trevor/validation-error-type branch 2 times, most recently from a8dbf63 to 8c6a3e6 Compare November 2, 2023 07:20
@pchickey pchickey added this pull request to the merge queue Nov 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 3, 2023
@elliottt elliottt added this pull request to the merge queue Nov 3, 2023
@elliottt elliottt removed this pull request from the merge queue due to a manual request Nov 3, 2023
@elliottt elliottt requested review from a team as code owners November 3, 2023 22:12
@elliottt elliottt requested review from fitzgen and removed request for a team November 3, 2023 22:12
@pchickey pchickey added this pull request to the merge queue Nov 3, 2023
Merged via the queue into bytecodealliance:main with commit 0e50d50 Nov 3, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasi Issues pertaining to WASI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants