Skip to content

Commit 818867c

Browse files
pankgeorgclaude
andauthored
Raise HTTP.jl compat floors to 1.10.19 and 2.7 (#3622)
On the 1.x line, 1.10.17 is affected by GHSA-h3x8-ppwj-6vcj (CR/LF header injection, fixed in 1.10.19). On the 2.x line, 2.7 is the first release that requires Reseau ≥ 1.4.3. Older Reseau sets `SO_REUSEADDR` on Windows TCP listeners, which on Windows lets a socket bind over a port another server is still listening on, so Pluto's search for a free port can settle on one that is already taken. 2.7 also includes 2.6.2, which runs server tasks on the `:interactive` thread pool, so with Julia's default threads from 1.12 on, Pluto's request handlers stay on one thread as they do with HTTP.jl 1; and it raises the server's request-line limit from 8 KiB to 64 KiB. CI pins both floors on Julia 1.10 so that the lowest allowed versions stay tested, and the `PLUTO_TEST_HTTP_VERSION` check in `test/webserver.jl` accepts a full version as well as a major version. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 921dc3e commit 818867c

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎.github/workflows/Test.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ jobs:
4141
# By default, resolve HTTP.jl freely — that gives us the latest 2.x.
4242
http-version: [""]
4343
# Pluto supports both HTTP.jl 1.x and 2.x (see src/webserver/HTTPCompat.jl),
44-
# so pin 1.x on a few of the combinations as well.
44+
# so pin the latest 1.x on a few of the combinations as well, and the lowest
45+
# versions that the HTTP compat entry in Project.toml allows on the oldest Julia.
4546
include:
4647
- julia-version: "1.10"
4748
os: ubuntu-latest
48-
http-version: "1"
49+
http-version: "1.10.19"
50+
- julia-version: "1.10"
51+
os: ubuntu-latest
52+
http-version: "2.7.0"
4953
- julia-version: "1.12"
5054
os: ubuntu-latest
5155
http-version: "1"
@@ -68,7 +72,7 @@ jobs:
6872

6973
- uses: julia-actions/cache@v3
7074

71-
- name: Pin HTTP.jl to ${{ matrix.http-version }}.x
75+
- name: Pin HTTP.jl to ${{ matrix.http-version }}
7276
if: matrix.http-version != ''
7377
run: julia --project=. -e 'import Pkg; Pkg.add(name="HTTP", version="${{ matrix.http-version }}"); Pkg.pin("HTTP"); Pkg.status("HTTP")'
7478

‎Project.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Downloads = "1"
4646
ExpressionExplorer = "0.5, 0.6, 1"
4747
FileWatching = "1"
4848
GracefulPkg = "2"
49-
HTTP = "^1.10.17, 2.4"
49+
HTTP = "^1.10.19, 2.7"
5050
HypertextLiteral = "0.7, 0.8, 0.9, 1"
5151
InteractiveUtils = "1"
5252
LRUCache = "1.6.2"

‎test/webserver.jl‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ end
5454
# differ in the parts exercised below: response framing, reading a request body, the
5555
# WebSocket upgrade, and closing a server that still has a WebSocket connected.
5656
@test Pluto.HTTP_IS_V2 == (pkgversion(HTTP) ≥ v"2")
57-
# CI runs this file against both supported major versions, see .github/workflows/Test.yml
57+
# CI runs this file against several HTTP.jl versions, see .github/workflows/Test.yml
5858
let pinned = get(ENV, "PLUTO_TEST_HTTP_VERSION", "")
59-
isempty(pinned) || @test string(pkgversion(HTTP).major) == pinned
59+
# `pinned` is a version prefix, like "1" or "2.7.0"
60+
isempty(pinned) || @test startswith("$(pkgversion(HTTP)).", "$pinned.")
6061
end
6162

6263
port = 13434

0 commit comments

Comments
 (0)