Skip to content

Upgrade to HTTP.jl 2.x - #302

Open
frankier wants to merge 3 commits into
OxygenFramework:masterfrom
frankier:http-2
Open

Upgrade to HTTP.jl 2.x#302
frankier wants to merge 3 commits into
OxygenFramework:masterfrom
frankier:http-2

Conversation

@frankier

@frankier frankier commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Closes #299

PR is tool assisted but reviewed and manually polished.

This PR upgrades to HTTP.jl.

One wrinkle here is that access_log is removed completely. Perhaps we should have a middleware for this built in and install it when access_log is not nothing.

Another is that queryparams is removed. In this PR the shadow-and-dispatch-to-the-original pattern is used with URIs.queryparams is used to avoid type piracy and keep reasonable compatibility with old code.

@frankier
frankier marked this pull request as draft July 9, 2026 07:52
@frankier
frankier force-pushed the http-2 branch 3 times, most recently from 9e433f0 to a44304b Compare July 10, 2026 11:46
@frankier

Copy link
Copy Markdown
Contributor Author

@ndortega This passes now, but I think there are enough changes that this strictly speaking should require an Oxygen 2.x . I can put this together with an upgrade guide in this PR if wanted.

@frankier
frankier marked this pull request as ready for review July 10, 2026 12:19
@frankier
frankier marked this pull request as draft July 13, 2026 14:59
@frankier

Copy link
Copy Markdown
Contributor Author

Found a bug in staticfiles after a bit of dogfooding. Will fix and report back.

 * Increases minimum Julia version to 1.11
 * Deprecates :stream, :access_log, and :queuesize
 * Creates new name queryparams(...) shadowing and dispatching to URIs rather than re-exporting from HTTP.jl
@frankier
frankier force-pushed the http-2 branch 2 times, most recently from 9ae779d to d4df3a9 Compare July 14, 2026 09:14
@frankier

Copy link
Copy Markdown
Contributor Author

Okay I've fixed the staticfiles issue and outlined how this is currently a bit surprising at JuliaWeb/HTTP.jl#1333

In the future it might be an idea to deprecate staticfiles/dynamicfiles and use HTTP.jl 2.x's own capabilities; see: https://juliaweb.github.io/HTTP.jl/stable/guides/server/#Static-Files . However, the ecosystem is rapidly adopting HTTP.jl 2.x so I think it might be best to make a fairly compatible release first, and then move to evolving the Oxygen.jl API and adopting more performant patterns later.

@frankier
frankier marked this pull request as ready for review July 14, 2026 09:56
Comment thread src/middleware/extract_ip.jl
@ndortega

Copy link
Copy Markdown
Member

Hi @frankier,

I just wanted to thank you for putting this PR together! I'll be going through it this weekend to provide some feedback. I don't see any reason why we can't get this merged within the next week

Comment thread src/middleware/rate_limiter.jl
Comment thread src/types.jl Outdated
Comment thread README.md
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.

Add Support for HTTP.jl v2.0

2 participants