tiny_httpd icon indicating copy to clipboard operation
tiny_httpd copied to clipboard

more serious testing

Open c-cube opened this issue 4 years ago • 4 comments

maybe depend on conf-curl/ocurl/curly to do the tests?

  • [ ] test gzip decoding (upload with compression enabled?)
  • [ ] test gzip encoding (see echo.ml and /zcat/file endpoint)
  • [ ] test routing
  • [ ] have a stupid middleware to instrument stats, do 10k calls, see if the stats match expectations
  • [ ] have a stupid middleware that adds a header to response (X-tested: ok?)

for gzip: we can use a select expression in dune, to avoid a hard dependency on it.

c-cube avatar Dec 10 '21 16:12 c-cube

And you can assign me to this task (i you want), I will need the same test for simple_httpd like the one for my PR #50 which is not very necessary for tiny_httpd compared to simple_httpd.

craff avatar Jan 15 '23 04:01 craff

Do you mind if http_of_dir move to the tiny_httpd_camlzip package to have a compress option. This would give a simple way to test compression and also allow more use case of http_of_dir.

craff avatar Jan 15 '23 23:01 craff

I think we can keep http_of_dir in the tiny_httpd package, but use the select expression in dune to have an optional dep on tiny_httpd_camlzip. I can give more details on how that works.

c-cube avatar Jan 18 '23 02:01 c-cube

Yes please, if you can give me details, I could use them for Simple_httpd too. I have ssl support (was easy to do with ocaml-ssl), but it is not easy to separate, the easiest would be to have a fake SSl module with the same interface. But I struggle with opam to do that. Ideally, I would like opam option to refer to separate git branch if possible.

craff avatar Jan 18 '23 07:01 craff