openresty / openresty/lua-resty-websocket

Incorrect default port for wss

Open
#21 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
523
Forks
112
Avg merge
1d 16m
Merged PRs (30d)
2

Description

The library is using port 80 instead of 443 for wss:// URLs, giving the following errors:

2017/06/03 13:20:12 [error] 5776#0: *2 SSL_do_handshake() failed (SSL: error:140770FC:SSL routines:SSL23_GET_
SERVER_HELLO:unknown protocol), context: ngx.timer

and

2017/06/03 13:10:52 [error] 3441#0: *2 peer closed connection in SSL handshake, context: ngx.timer
ssl handshake failed: handshake failed

Using :443 in the URL fixes the problem, like wss://echo.websocket.org:443

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown wss://echo.websocket.org URL, first without a port and then with :443, and trace where the default port is selected. Done means a wss:// URL connects using port 443 without an explicit port and no longer produces the reported SSL handshake errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.