Skip to content

Commit

Permalink
fix(cli/websocket): set User-Agent header (denoland#8470)
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Nov 26, 2020
1 parent 9042fcc commit a837fb9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/ops/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ pub async fn op_ws_create(
let uri: Uri = args.url.parse()?;
let mut request = Request::builder().method(Method::GET).uri(&uri);

request =
request.header("User-Agent", format!("Deno/{}", crate::version::DENO));

if !args.protocols.is_empty() {
request = request.header("Sec-WebSocket-Protocol", args.protocols);
}
Expand Down

0 comments on commit a837fb9

Please sign in to comment.