-
Notifications
You must be signed in to change notification settings - Fork 31
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 #64
Cohttp #64
Conversation
@dinosaure @rgrinberg It doesn't build, and I don't know cohttp enough to know why, please fix. :3 |
ok, thanks to @rgrinberg, it builds and launches now. |
This frankenstein actually works O_o? |
@Drup is your rebase magic great enough to kick out the bytes commits? |
It launches, as in What do you mean for the bytes commit ? |
I mean that I'd like to give it another more thorough review but the diff is still a little heavy. I guess there's only so much magic you can do :/ |
Are you looking commit by commit ? Apart from the big cohttp commit, the rest is small. And the big one is almost only the cohttp stuff. I didn't looked closely at the big commit yet. |
@Drup at this point IMO it's a question of testing. I'm happy to help out but given that you're more experienced you should take the lead and make a plan for us. |
c93143c
to
c075d52
Compare
@Drup @dinosaure Seems like there's a bug somewhere:
Will not give you an image back. This is where teh exception is thrown
|
Looks like the above test only fails in cohttp master. 0.15.2 is working fine. We'll need to bisect through this stuff |
I found the bug and it's very deep. In mirage:ocaml-cohttp@v0.15.2, the main conversion between I don't know if we change the compute of Cohttp or Ocsigen for this bug. I think, it's better to change the compute of Ocsigen. |
@dinosaure good catch. Is this caused by the following re? ocsigenserver/src/baselib/ocsigen_lib.ml Line 186 in 501c12b
It doesn't allow url's to start without a scheme which is wrong. |
@Drup @dinosaure OK so there's progress. This branch now works in the happy case. There are some differences in behavior for error handling however. For example:
|
Backtraces:
|
807f952
to
e38170e
Compare
The eliom test runs, I'll paste the differences here:
|
The CRSF test is broken on both. |
alternative parameters seem to be broken too, on both. |
That's pretty much it. All the other things pass. |
I noticed the following issues last month. We need to check that they are properly addressed:
|
The send parameter was just a partially applied value of Ocsigen_http_com.send. Since send is no longer useable in the cohttp port, we can omit it and just return the result frame frame.
Based on rgrinberg's patch.
In according with ocsigenserver@d4ae266. The compute of the [ADDR_INET] will be in Ocsigen_cohttp_server module to compute only once.
@dinosaure I pushed your (modified) stuff. I'm not very happy about the remaining assert false. |
Fix a misconception between the initialization of server in Ocsigen_server and the main loop in Ocsigen_cohttp_server about the type of address (before this patch, we cast an inet_addr to a string in initialization, and we cast this string (with possible fail) to inet_addr, now we keep inet_addr).
@dinosaure Ok, I like this version much better. It's quite nice now. |
It's not needed anymore with cohttp.
aaand I killed awake. |
Also improve the printing function a bit.
I pushed 3 bug fixes. You can thanks warning 27. |
HTTP/1.0 seems to be broken:
|
There is no buffering, so the reply can be extremely fragmented. But that's probably more an issue with Eliom/Tyxml than with Ocsigenserver.
|
While doing some benchmarks, I ran into this: https://github.com/ocsigen/ocsigenserver/pull/64/files#diff-af00eddd5261fa6f6ab200223ead43f5R137 The Commenting it out gives over 30% speedup in smaller responses. With this, the buffer pool in conduit, the last-chunk optimization and a change in the buffer size used by |
Except for the debug printer I hacked quickly (46fcee6), we are not using ppx so we should be able to enable camlp4. Thanks you for the pointer. |
Closing. We have revived the Cohttp effort in another branch. PR to come . |
Follows and is based on #63. This one contains the actual cohttp stuff. Starts after the commit 49f6433