-
Notifications
You must be signed in to change notification settings - Fork 6
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
Expose more options, avoid descriptor exhaustion crashes, improve documentation #22
Conversation
The bit that handles descriptor exhaustion is related to issue #21, which I had replied to via email but apparently never appeared on GitHub. Sorry about that. If you have any thoughts, I'd love to hear them. Otherwise, my changes are pretty minimal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Thanks! Happy to help |
I've exposed more options to the user via compile time consts that can be defined by the user, and I've also improved documentation in various areas that were bare.
I've also wrapped acceptClient in a try...except that ignores descriptor exhaustion errors, which fixes the ability for anyone to overload the server with connections and crash it.
Additionally, serverInfo has been renamed to httpxServerName (but the old constant still works), and defining it as empty will omit it from the HTTP response. Some users may not want to expose which HTTP server they're using to serve requests, and I think this would be a good thing to have as an option.