summaryrefslogtreecommitdiff
path: root/runtime/ops/http.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-10-12 17:55:50 +0200
committerGitHub <noreply@github.com>2023-10-12 15:55:50 +0000
commitc464cd7073c761780b3170a48542c387560e3f26 (patch)
tree881a26d05423f9c696c8f35ce8bd2d72d562b1ea /runtime/ops/http.rs
parent5dd010a4fbeb0602891ea537b98216b8ad7d27a7 (diff)
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
Diffstat (limited to 'runtime/ops/http.rs')
-rw-r--r--runtime/ops/http.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/ops/http.rs b/runtime/ops/http.rs
index 07757850c..f0f0510da 100644
--- a/runtime/ops/http.rs
+++ b/runtime/ops/http.rs
@@ -27,6 +27,8 @@ use deno_net::io::UnixStreamResource;
#[cfg(unix)]
use tokio::net::UnixStream;
+pub const UNSTABLE_FEATURE_NAME: &str = "http";
+
deno_core::extension!(
deno_http_runtime,
ops = [op_http_start, op_http_upgrade],
@@ -73,7 +75,7 @@ fn op_http_start(
.resource_table
.take::<deno_net::io::UnixStreamResource>(tcp_stream_rid)
{
- super::check_unstable(state, "Deno.serveHttp");
+ super::check_unstable(state, UNSTABLE_FEATURE_NAME, "Deno.serveHttp");
// This UNIX socket might be used somewhere else. If it's the case, we cannot proceed with the
// process of starting a HTTP server on top of this UNIX socket, so we just return a bad