Handle OpenSSL::SSL:SSLError
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- networking
Research direction
Start in lib/webrick/server.rb around lines 252-277 and reproduce the aborted HTTPS connection with nc against the Webrick HTTPS listener on port 8443. Compare the existing handling of basic network errors with this OpenSSL::SSL::SSLError and establish the expected logging behavior for benign connection aborts; done means that behavior is implemented and verified.
Written by the indexing model from the issue text.
Description
We use a server config where Webrick also handles HTTPS. When a connection is aborted, an exception is logged. For example:
$ nc localhost 8443
$ cat server.log
2021-05-26T11:52:34 [E] <OpenSSL::SSL::SSLError> SSL_accept SYSCALL returned=5 errno=0 state=before SSL initialization
/usr/share/ruby/webrick/server.rb:299:in `accept'
/usr/share/ruby/webrick/server.rb:299:in `block (2 levels) in start_thread'
/usr/share/ruby/webrick/utils.rb:263:in `timeout'
/usr/share/ruby/webrick/server.rb:297:in `block in start_thread'
/usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
This comes from:
https://github.com/ruby/webrick/blob/3515081a51b91b730267ba2b224039ecfbf8bd7b/lib/webrick/server.rb#L252-L277
It does look like various basic network errors are caught and ignored, but SSL errors can fall in the same category (such as this one). Not everything should be logged at the error level. I'm not sure how it should exactly be dealt with (or I'd submit a patch instead of a PR) so I'm looking for input on this.
- Dominant language
- Ruby
- Stars
- 328
- Forks
- 114
- Avg merge
- 1h 15m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/webrick
-
Retire superfluous quoting of Content-Type: charset [RFC7230]Possibly taken @jeremyevans claimed this 62 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
CGI script using LF line breaks in headers causes errorPossibly taken @paulownia claimed this 603 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Similar issues
-
needs verification
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 13 days
-
🐛 bug 👩💻 équipe CE 🧑🏭 entreprises
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
betagouv/conseillers-entreprises#4808 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
yosiat/panko_serializer#250 ·