Scala Native TLSSocket#applicationProtocol behavior is inconsistent with JVM
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- scala
- Área
- networking
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Scala
- Estrellas
- 2.5k
- Forks
- 633
- Merge medio
- 3 d 21 h
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de typelevel/fs2
-
Reading from a socket gets stuck on Node.js 26Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
typelevel/fs2#3800 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Feature Proposal: report progress writing to socketsPosiblemente ocupada @reardonj la tomó hace 30 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
typelevel/fs2#3719 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 3 días
Todos los issues de typelevel/fs2
Issues similares
-
No test covers transaction re-request after a delivery timeoutPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ergoplatform/ergo#2916 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Area: PDF support
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
orbeon/orbeon-forms#8055 ·
Los mantenedores suelen responder en 2 días
-
Table of downloads is too longAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lichess-org/database#103 ·
-
kind:bug priority:major
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día