-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cohttp revived #124
Cohttp revived #124
Conversation
We need to correctly handle paths in Ocsigen_cohttp_server.Request for this to work.
- store sub_path - update function - Abstract t type
- Replaces old ri_of_url - Untested
Do not translate back and forth. Do we really need this module? It doesn't do much on top of Cohttp_lwt_unix.Client.
- Ocsigen_request - Ocsigen_response - Ocsigen_cohttp for what remains
We need Ocsigen_cookies on the client, but we don't want to link-in Ocsigen_lib.
Faster, and perform much less memory allocations. Fixes #117.
By pure curiosity, do you intend to switch to httpaf ? |
@Drup |
Fair enough. I would think moving from cohttp to httpaf would be significantly easier than what you already did, but it's indeed a bit early. |
72382c8
to
2994ad6
Compare
This is a new effort to layer Ocsigenserver over cohttp. It started with the #63 code (thanks @dinosaure, @Drup, @rgrinberg). The high-level difference is that all extensions operate directly on cohttp-friendly requests (
Ocsigen_request.t
) and responses (Ocsigen_response.t
), as opposed to translating cohttp requests to Ocsigen requests, performing Ocsigen stuff in the middle, and translating the final Ocsigen response to a cohttp response.The branch brings some other improvements not entirely related to cohttp. Notably:
Ocsigen_server.Site
).pcre
bindings instead ofNetstring_pcre
.xml-light
in place of theSimplexmlparser
in TyXML.There are corresponding
cohttp
branches for Eliom and Ocsigen Start. The Eliom branch in particular needs thorough review.There are a few missing pieces.
Not all extensions have been ported to the new APIs.
Eliom_comet
).Some extensions cannot yet be used via
Ocsigen_server.Site
. Meaningfully:Ocsigen_server.Site
).Revproxy uses the Cohttp client, and we doubt it works the way it used to. See Reverse proxy (cohttp version): reuse connections #128.
More thorough testing.
Documentation, especially for the
Ocsigen_server.Site
API and related workflow.Do we need
Ocsigen_multipart
, or ismultipart-form-data
good for our purposes? I have some outdated code for using the latter.For now, you can open other PRs against the
cohttp
branch (NOT againstmaster
).Feel free to open issues where discussion is needed, for the above points or for anything else.