elli-lib / elli

Simple, robust and performant Erlang web server
https://github.com/elli-lib/elli/blob/develop/doc/README.md
MIT License
324 stars 38 forks source link

Exporting additional functions #97

Closed jeffgrunewald closed 3 years ago

jeffgrunewald commented 3 years ago

We're using Elli in a project and finding a couple of functions currently private to the elli_http module that would be useful for us to have access to and hoping you agree there's no reason not to expose them for external use.

elli_http:send_file/5 - this one looks like it could be exposed already to mirror the exported elli_http:send_response/4 and is already fully spec'd and documented.

elli_http:close_or_keepalive/2 - this one is useful for handlers operating in handover mode where the implementation will be handling the response but wants to properly honor the session keepalive configuration based on the header with a sane default based on HTTP version.

I've prepared a PR that should take care of this or collect comments/feedback if this isn't desirable as-is.

Thanks!

jeffgrunewald commented 3 years ago

Addressed by https://github.com/elli-lib/elli/pull/98 as a proposed solution.