-
Notifications
You must be signed in to change notification settings - Fork 19
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
http parser #10
Comments
Quoting original proposal:
This is OK for me, except that recv could optionally use maximum number of bytes to read (to prevent malicious requests), so:
|
I started on it last night then I came to the realisation that writing these sorts of extensions should be easier than they are. So I'm going to do it basically, but as an extension, and at the same time make the code more modular; wrap up the libuv API, make luv_object_t more generic and allow for polymorphic checks on it (so we need assertions that something is a stream, if it's a tcp object). I think we can reuse a lot of pieces from dvv's uhttp code. So here goes :) |
To get back to the OP. The question of interface. I think PSGI-like interface is the way to go (including middleware). http://search.cpan.org/~miyagawa/PSGI-1.101/PSGI.pod I know it's Perl, but miyagawa++ is a badass programmer with a good feel for design. |
great! i don't get error stream -- how they use it? |
With Perl you can reopen STDERR as the stream if you want in the app code, or you just write to it (it's got a IO::Handle interface, so $env->{psgi.errors}->print(...) will work. On the backend side there's an adaptor (for Apache, or FCGI, or whatever) which has connected STDERR to this and will do it's usual stuff with it (log it to a file, or whatever). |
i believe the parser should: ooff :) |
https://github.com/brimworks/lua-http-parser maybe this is useful. On Wed, Oct 10, 2012 at 6:14 PM, Vladimir Dronnikov <
Nothing is impossible. |
yeah, it is. i use it so far at https://github.com/dvv/luv-1/blob/master/examples/http_hellosvr.lua#L32 update: i meant Neopallium's fork really |
any progress? |
Hey, I've pulled the code apart and am putting the pieces back together. The old luv_object_t is gone, as is luv_fiber_t and luv_thread_t. Instead I've reduced things down to a single polymorphic struct with The reason for all this is that HTTP parsing isn't the only thing The old code assumed that the only things that you would resume during I wanted to get the design right, so I've been doing loads of On Oct 15, 2012, at 11:17 AM, Vladimir Dronnikov wrote:
|
i see, thank you |
do we need luv.http? what would be its domain? interface exposed? what middleware strategy -- connect-style? *sgi style?
let us discuss that here
The text was updated successfully, but these errors were encountered: