Skip to content

Migrate to HTTP.jl 2.x (require 2.4)#3565

Open
dependabot[bot] wants to merge 3 commits into
mainfrom
dependabot/julia/all-julia-packages-069b06cd98
Open

Migrate to HTTP.jl 2.x (require 2.4)#3565
dependabot[bot] wants to merge 3 commits into
mainfrom
dependabot/julia/all-julia-packages-069b06cd98

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 30, 2026

Copy link
Copy Markdown
Contributor

Migrates Pluto's web server to the HTTP.jl 2.x API. HTTP.jl 2.0 is a breaking rewrite built on the Reseau transport layer, so this adapts the server code and drops pre-2.0 compatibility.

(This branch started as the Dependabot compat bump; the commits on top implement the actual migration.)

Version requirement: HTTP = "2.4"

  • The mixed HTTP+WebSocket server helper HTTP.WebSockets.upgrade(f, stream) (Pluto serves HTTP and WebSockets on one port) is not in 2.0.0 — it was added in 2.1.0 (JuliaWeb/HTTP.jl#1255).
  • HTTP.jl 2.02.3 are affected by 14 security advisories, JLSEC-2026-611 … JLSEC-2026-624 (HTTP/2 stream-cap DoS, fileserver path traversal, redirect/cookie/origin handling, request smuggling, SSE injection, weak WebSocket masking RNG, HPACK desync, …), all fixed in v2.4.0 (SecurityAdvisories.jl#549).

So the floor is 2.4. The 2.4 API surface Pluto uses is identical to 2.1 (verified: WebSockets.upgrade still takes check_origin).

Changes

  • WebServer.jllisten! no longer accepts server=/on_shutdown/stream/verbose, so Pluto binds the TCP.Listener itself (keeping the port-hint search) and passes it to listen!. The graceful close(::HTTP.Server) now waits for active WebSocket connections, so client shutdown runs from RunningPlutoServer before the server is closed.
  • The server Stream only exposes request metadata via http.message; the handler now rebuilds the request with its body, assigns http.response, and writes the body bytes (mirroring HTTP's own stream handler). A client disconnect surfaces as SystemError under Reseau, so it's swallowed alongside IOError.
  • HTTP.WebSocket / HTTP.send move under HTTP.WebSockets. WebSocket Origin checking is left off (as in 1.x) because it breaks proxied setups like Binder/JuliaHub; the server secret is the real auth.
  • auth_middlewareHeaders is no longer a plain vector, so the filter! is replaced with setheader (which de-duplicates).
  • readtimeoutread_idle_timeout.
  • Teststest/Configuration.jl: the cookie-jar keyword is cookiejar, not jar (the old name was silently ignored). test/compiletimes.jl: the HTTP-get warmup hit http://github.com, whose redirect to https is now followed into Reseau's TLS stack; kept it a plain request with redirect=false.

Verification

Backend tests pass on CI for the supported Julia versions, and a local smoke test (boot server → HTTP routes → WebSocket upgrade) passes against HTTP 2.4.0:

  • Configurations: 182/182
  • Web server: 25/25

Notes

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file julia Pull requests that update julia code labels May 30, 2026
@dependabot dependabot Bot changed the title Update HTTP requirement from ^1.10.17 to ^1.10.17, 2.0 in the all-julia-packages group across 1 directory Update HTTP requirement from ^1.10.17 to ^1.10.17, 2.1 in the all-julia-packages group across 1 directory Jun 6, 2026
@dependabot dependabot Bot force-pushed the dependabot/julia/all-julia-packages-069b06cd98 branch from c4bf32e to 35008a3 Compare June 6, 2026 12:05
@pankgeorg pankgeorg force-pushed the dependabot/julia/all-julia-packages-069b06cd98 branch from 4c7b25a to 642fa14 Compare June 8, 2026 09:23
@pankgeorg pankgeorg changed the title Update HTTP requirement from ^1.10.17 to ^1.10.17, 2.1 in the all-julia-packages group across 1 directory Migrate to HTTP.jl 2.x (require 2.1) Jun 8, 2026
dependabot Bot and others added 2 commits June 9, 2026 12:03
Updates the requirements on [HTTP](https://github.com/JuliaWeb/HTTP.jl) to permit the latest version.

Updates `HTTP` to 2.1.0
- [Release notes](https://github.com/JuliaWeb/HTTP.jl/releases)
- [Changelog](https://github.com/JuliaWeb/HTTP.jl/blob/master/CHANGELOG.md)
- [Commits](JuliaWeb/HTTP.jl@v1.10.17...v2.1.0)

---
updated-dependencies:
- dependency-name: HTTP
  dependency-version: 2.0.0
  dependency-type: direct:production
  dependency-group: all-julia-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
HTTP.jl 2.0 is a breaking rewrite on the Reseau transport layer. This adapts
Pluto's web server to the new API and drops pre-2.0 compatibility.

- Require `HTTP = "2.1"`. The mixed HTTP+WebSocket server helper
  `HTTP.WebSockets.upgrade(f, stream)` is not in 2.0.0 (added in 2.1.0), and
  Pluto serves HTTP and WebSockets on one port, so 2.0.0 cannot be supported.
- WebServer.jl: `listen!` no longer takes `server=`/`on_shutdown`/`stream`/
  `verbose`, so bind the `TCP.Listener` ourselves (keeping the port-hint
  search) and pass it to `listen!`. The graceful `close(::HTTP.Server)` waits
  for active WebSocket connections, so client shutdown now runs from
  `RunningPlutoServer` before the server is closed.
- The server `Stream` exposes request metadata via `http.message`; rebuild the
  request with its body for the handlers, then assign `http.response` and write
  the body bytes (mirrors HTTP's own stream handler). A client disconnect now
  surfaces as `SystemError` (Reseau), so it is swallowed alongside `IOError`.
- `HTTP.WebSocket`/`HTTP.send` move under `HTTP.WebSockets`. Keep 1.x behavior
  of not checking the WebSocket `Origin` (it breaks proxied setups; the secret
  is the real auth).
- `auth_middleware`: `Headers` is no longer a plain vector, so replace the
  `filter!` with `setheader`, which already de-duplicates.
- `readtimeout` -> `read_idle_timeout`.
- test/Configuration.jl: the cookie jar keyword is `cookiejar`, not `jar`.
- test/compiletimes.jl: the HTTP-get warmup used `http://github.com`, whose
  redirect to https is now followed into Reseau's TLS stack; keep it a plain
  request with `redirect=false`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pankgeorg pankgeorg force-pushed the dependabot/julia/all-julia-packages-069b06cd98 branch from 642fa14 to ca563db Compare June 9, 2026 09:03
@pankgeorg

Copy link
Copy Markdown
Member

So, there is a concern in that HTTP.jl#2.X is new, and not really security hardened.

HTTP.jl 2.0–2.3 are affected by 14 security advisories (JLSEC-2026-611 through
JLSEC-2026-624: HTTP/2 stream-cap DoS, fileserver path traversal, redirect/cookie/
origin handling, request smuggling, SSE injection, weak WebSocket masking RNG,
HPACK desync, ...), all fixed in HTTP.jl v2.4.0. Raise the floor from 2.1 to 2.4.

The 2.4 API surface Pluto uses is unchanged from 2.1 (`HTTP.WebSockets.upgrade`
still accepts a `check_origin` callback, etc.).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pankgeorg pankgeorg changed the title Migrate to HTTP.jl 2.x (require 2.1) Migrate to HTTP.jl 2.x (require 2.4) Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file julia Pull requests that update julia code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant