Scala Native TLSSocket#applicationProtocol behavior is inconsistent with JVM
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- scala
- Lĩnh vực
- networking
Hướng nghiên cứu
Start with the Scala Native TLSSocket#applicationProtocol implementation and compare it with the JVM version, which wraps the possibly null value in an Option and returns the empty string when no protocol is negotiated. The s2n method returning null and the guard call that throws are the points to examine. Pull request #3779 already targets this, so review or test that work rather than starting a parallel fix. Done means Scala Native returns the empty string when no protocol is negotiated, matching the JVM.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Root cause of http4s issue: https://github.com/http4s/http4s/issues/7917
On Scala Native, when there is not applicationProtocol, the s2n method returns null and guard throws.
On JVM, the potentially null string is wrapped in an Option and a NoSuchElementException is thrown instead. When no protocol is negotiated, the result is the empty string.
http4s does not recover from the s2n exception, and IMO should not need to detect it. Instead, Scala Native's behaviour should be consistent with the JVM and return the empty string in this situation.
Prior Art
There is a PR from several years ago to add an option version of applicationProtocol: https://github.com/typelevel/fs2/pull/3215. While the overall API here could be improved, a fix for the Scala Native behavior could have a much smaller scope.
The applicationProtocol behavior also came up in https://github.com/http4s/http4s/pull/7963 where it was observed that FS2 JS also matches the JVM behaviour by turning false into the empty string
- Ngôn ngữ chính
- Scala
- Star
- 2.5k
- Fork
- 633
- Merge trung bình
- 3 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của typelevel/fs2
-
Reading from a socket gets stuck on Node.js 26Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
typelevel/fs2#3800 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Feature Proposal: report progress writing to socketsCó thể đã có người làm @reardonj đã nhận 30 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
typelevel/fs2#3719 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của typelevel/fs2
Issue tương tự
-
No test covers transaction re-request after a delivery timeoutCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ergoplatform/ergo#2916 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Area: PDF support
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
orbeon/orbeon-forms#8055 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Table of downloads is too longĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lichess-org/database#103 ·
-
kind:bug priority:major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày