Closed toonetown closed 5 years ago
Is running with debugging output enough?
$ websocat -s 1234 -v -v
Listening on ws://127.0.0.1:1234/
INFO 2019-02-25T19:53:55Z: websocat::lints: Auto-inserting the line mode
INFO 2019-02-25T19:53:55Z: websocat::sessionserve: Serving Message2Line(WsServer(TcpListen(V4(127.0.0.1:1234)))) to BroadcastReuser(Line2Message(Stdio)) with Options { websocket_text_mode: true, websocket_protocol: None, udp_oneshot_mode: false, unidirectional: false, unidirectional_reverse: false, exit_on_eof: true, oneshot: false, unlink_unix_socket: false, exec_args: [], ws_c_uri: "ws://0.0.0.0/", linemode_strip_newlines: false, linemode_strict: false, origin: None, custom_headers: [], websocket_version: None, websocket_dont_close: false, one_message: false, no_auto_linemode: false, buffer_size: 65536, broadcast_queue_len: 16, read_debt_handling: Warn, linemode_zero_terminated: false, restrict_uri: None, serve_static_files: [], exec_set_env: false, reuser_send_zero_msg_on_disconnect: false, process_zero_sighup: false, process_exit_sighup: false, socks_destination: None, auto_socks5: None, socks5_bind_script: None, tls_domain: None, tls_insecure: false }
INFO 2019-02-25T19:53:58Z: websocat::net_peer: Incoming TCP connection from 127.0.0.1:37496
DEBUG 2019-02-25T19:53:58Z: websocat::sessionserve: Underlying connection established
INFO 2019-02-25T19:53:58Z: websocat::ws_server_peer: Incoming connection to websocket: /
DEBUG 2019-02-25T19:53:58Z: websocat::ws_server_peer: Incoming { version: Http11, subject: (Get, AbsolutePath("/")), headers: Headers { Host: 127.0.0.1:1234
, Connection: Upgrade
, Upgrade: websocket
, Sec-WebSocket-Version: 13
, Sec-WebSocket-Key: XWGQq/BnO84n0e36cgHq6A==
, } }
DEBUG 2019-02-25T19:53:58Z: websocat::ws_server_peer: Headers { }
DEBUG 2019-02-25T19:53:58Z: websocat::ws_server_peer: Headers { Sec-WebSocket-Accept: AYsIHHcCrsRh/aw846dPNE3OlZo=
, Connection: Upgrade
, Upgrade: websocket
, }
INFO 2019-02-25T19:53:58Z: websocat::ws_server_peer: Upgraded
INFO 2019-02-25T19:53:58Z: websocat::broadcast_reuse_peer: Initializing
INFO 2019-02-25T19:53:58Z: websocat::stdio_peer: get_stdio_peer (async)
INFO 2019-02-25T19:53:58Z: websocat::stdio_peer: Setting stdin to nonblocking mode
INFO 2019-02-25T19:53:58Z: websocat::stdio_peer: Installing signal handler
DEBUG 2019-02-25T19:54:01Z: websocat::ws_peer: incoming None
DEBUG 2019-02-25T19:54:01Z: websocat::my_copy: BrokenPipe: read_done
DEBUG 2019-02-25T19:54:01Z: websocat::my_copy: done
INFO 2019-02-25T19:54:01Z: websocat::sessionserve: Forward finished
INFO 2019-02-25T19:54:01Z: websocat::sessionserve: Forward shutdown finished
INFO 2019-02-25T19:54:01Z: websocat::sessionserve: One of directions finished
DEBUG 2019-02-25T19:54:01Z: websocat::ws_peer: drop WsWriteWrapper
Absolutely, it is. I ran it with -v
(which, apparently is just INFO
level). DEBUG
level addresses it fully.
It would be nice (for some quick-and-dirty debugging) to have the option to print out the requested http headers when running in server mode (
-s
).