Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions runtime/fastly/builtins/fastly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ bool Fastly::createWebsocketHandoff(JSContext *cx, unsigned argc, JS::Value *vp)
}
auto websocket_upgrade_request = &request_value.toObject();

RootedObject request(cx, websocket_upgrade_request);
if (!RequestOrResponse::commit_headers(cx, request)) {
return false;
}

auto response_handle = host_api::HttpResp::make();
if (auto *err = response_handle.to_err()) {
HANDLE_ERROR(cx, *err);
Expand Down
2 changes: 2 additions & 0 deletions runtime/fastly/builtins/fetch/request-response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2962,9 +2962,11 @@ std::optional<host_api::HttpReq> Response::websocket_upgrade_request(JSObject *o
MOZ_ASSERT(is_instance(obj));
auto websocket_upgrade_request =
JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::WebsocketUpgradeRequest));

if (websocket_upgrade_request.isUndefined()) {
return std::nullopt;
}

return host_api::HttpReq(websocket_upgrade_request.toInt32());
}

Expand Down
5 changes: 5 additions & 0 deletions target/rust-analyzer/flycheck0/stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
warning: only one of `license` or `license-file` is necessary
`license` should be used if the package license can be expressed with a standard SPDX expression.
`license-file` should be used if the package uses a non-standard license.
See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.24s
Loading
Loading