1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(websocket): set User-Agent header (#8502)

This commit is contained in:
Bartek Iwańczuk 2020-11-26 15:12:08 +01:00 committed by GitHub
parent a837fb9a07
commit 8d0b1b40f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,7 @@ pub async fn op_ws_create(
let mut request = Request::builder().method(Method::GET).uri(&uri); let mut request = Request::builder().method(Method::GET).uri(&uri);
request = request =
request.header("User-Agent", format!("Deno/{}", crate::version::DENO)); request.header("User-Agent", format!("Deno/{}", crate::version::deno()));
if !args.protocols.is_empty() { if !args.protocols.is_empty() {
request = request.header("Sec-WebSocket-Protocol", args.protocols); request = request.header("Sec-WebSocket-Protocol", args.protocols);