Hacker News new | ask | show | jobs
by cryptonector 2377 days ago
^Fchunked

No chunked support. Well, if ever I use this (and... I do have a pressing use for something like this), that will be a PR I'll send in, probably using async.h[0] to allow handlers to be asynchronous.

Also, it's no fair to compare this server's performance to nginx if this server has no TLS support: you'll have to setup a reverse proxy, and then what will that be?

The lack of URI parsing is not a big deal for me, but it'd be nice.

[0] https://github.com/naasking/async.h

1 comments

Yes, there are some pieces missing that are on my radar like chunked support, uri/query parsing and sendfile.
> [...] some pieces missing that are on my radar like chunked support, uri/query parsing and sendfile

I like the idea. Keep it up. The "some things" that are missing are really the basics of any HTTP server. Now it's more like something you could build a minimal REST API on. (With the need of a "real" server as proxy)

The goal is definitely not to replace NGINX or Apache or the like. I don't see handling TLS ever being a goal of this project, same with HTTP2 support. Although allowing the user to plug something in to handle HTTPS may not be out of the question.
Then I'd actually consider renaming your project to better transport your target scope. What you have in mind more sounds like a minimal library for writing non blocking REST APIs or HTTP based handlers, and not (full featured, as usually expected) HTTP servers. I really like it, though.
Speaking of sendfile: take a look at io_uring, considering the asynchronous nature of this.