Skip to content

Set explicit Host header for HTTP.jl v2 compatibility#35

Merged
jbrea merged 1 commit into
JuliaAI:http-2from
pebeto:http-2
Jun 23, 2026
Merged

Set explicit Host header for HTTP.jl v2 compatibility#35
jbrea merged 1 commit into
JuliaAI:http-2from
pebeto:http-2

Conversation

@pebeto

@pebeto pebeto commented Jun 23, 2026

Copy link
Copy Markdown
Member

Adds the runtime fix needed to actually make HTTP.jl v2 work against the OpenML API, complementing the compat bump in #34.

Root cause

HTTP.jl v2 writes the port into the Host header for HTTPS requests, e.g. Host: www.openml.org:443. OpenML's server rejects any request whose Host carries an explicit port — it closes the connection, which surfaces as:

http parse error: unexpected EOF while reading HTTP/1 data

HTTP.jl v0.x/v1.x and curl omit the default port, which is why this only appears on v2.

Fix

Set the Host header explicitly (without the port), derived once from API_URL.

@jbrea jbrea merged commit 4728daf into JuliaAI:http-2 Jun 23, 2026
7 checks passed
@jbrea

jbrea commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants