diff options
Diffstat (limited to 'runtime/ops/http.rs')
-rw-r--r-- | runtime/ops/http.rs | 4 |
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 |