mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2026-03-07 21:37:57 -05:00
Compare commits
2 commits
a07936dac4
...
f7ec687158
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7ec687158 | ||
|
|
1b53064ed6 |
6 changed files with 81 additions and 43 deletions
|
|
@ -1,4 +1,12 @@
|
|||
|
||||
## 0.20
|
||||
|
||||
- eio backend, second try (#95)
|
||||
- hardening bugfixes
|
||||
- feat WS: abstraction for critical section
|
||||
- feat route: add `to_url`, to produce a URL path from a route
|
||||
- fix some warnings
|
||||
|
||||
## 0.19
|
||||
|
||||
- feat(headers): `set` will not reallocate whole list if not needed
|
||||
|
|
|
|||
46
dune-project
46
dune-project
|
|
@ -1,42 +1,60 @@
|
|||
(lang dune 3.2)
|
||||
|
||||
(name tiny_httpd)
|
||||
|
||||
(generate_opam_files true)
|
||||
|
||||
(authors c-cube)
|
||||
|
||||
(maintainers c-cube)
|
||||
(version 0.19)
|
||||
(source (github c-cube/tiny_httpd))
|
||||
|
||||
(version 0.20)
|
||||
|
||||
(source
|
||||
(github c-cube/tiny_httpd))
|
||||
|
||||
(homepage https://github.com/c-cube/tiny_httpd/)
|
||||
|
||||
(license MIT)
|
||||
|
||||
(package
|
||||
(name tiny_httpd)
|
||||
(synopsis "Minimal HTTP server using threads")
|
||||
(tags (http thread server tiny_httpd http_of_dir simplehttpserver))
|
||||
(tags
|
||||
(http thread server tiny_httpd http_of_dir simplehttpserver))
|
||||
(depopts
|
||||
logs
|
||||
magic-mime
|
||||
(mtime (>= 2.0)))
|
||||
(mtime
|
||||
(>= 2.0)))
|
||||
(depends
|
||||
seq
|
||||
base-threads
|
||||
result
|
||||
hmap
|
||||
(iostream (>= 0.2))
|
||||
(ocaml (>= 4.13))
|
||||
(iostream
|
||||
(>= 0.2))
|
||||
(ocaml
|
||||
(>= 4.13))
|
||||
(odoc :with-doc)
|
||||
(logs :with-test)
|
||||
(conf-libcurl :with-test)
|
||||
(ptime :with-test)
|
||||
(qcheck-core (and (>= 0.91) :with-test))))
|
||||
(qcheck-core
|
||||
(and
|
||||
(>= 0.91)
|
||||
:with-test))))
|
||||
|
||||
(package
|
||||
(name tiny_httpd_camlzip)
|
||||
(synopsis "Interface to camlzip for tiny_httpd")
|
||||
(depends
|
||||
(tiny_httpd (= :version))
|
||||
(camlzip (>= 1.06))
|
||||
(iostream-camlzip (>= 0.2.1))
|
||||
(tiny_httpd
|
||||
(= :version))
|
||||
(camlzip
|
||||
(>= 1.06))
|
||||
(iostream-camlzip
|
||||
(>= 0.2.1))
|
||||
(logs :with-test)
|
||||
(odoc :with-doc)))
|
||||
|
||||
|
|
@ -44,8 +62,12 @@
|
|||
(name tiny_httpd_eio)
|
||||
(synopsis "Use eio for tiny_httpd")
|
||||
(depends
|
||||
(tiny_httpd (= :version))
|
||||
(eio (and (>= 1.0) (< 2.0)))
|
||||
(tiny_httpd
|
||||
(= :version))
|
||||
(eio
|
||||
(and
|
||||
(>= 1.0)
|
||||
(< 2.0)))
|
||||
base-unix
|
||||
(logs :with-test)
|
||||
(odoc :with-doc)))
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
especially since Eio itself is also subject to change.
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
(* TODO: pass in a switch *)
|
||||
|
||||
type 'a with_args =
|
||||
?addr:string ->
|
||||
?port:int ->
|
||||
|
|
@ -28,4 +26,14 @@ val create :
|
|||
unit ->
|
||||
Tiny_httpd.Server.t)
|
||||
with_args
|
||||
(** Create a server *)
|
||||
(** Create a server.
|
||||
|
||||
Example:
|
||||
{[
|
||||
Eio_main.run @@ fun stdenv ->
|
||||
Eio.Switch.run ~name:"my_server" @@ fun sw ->
|
||||
let server = Tiny_httpd_eio.create ~port:8080 ~stdenv ~sw () in
|
||||
(* add routes... *)
|
||||
Tiny_httpd.Server.add_route_handler [....];
|
||||
Tiny_httpd.Server.run_exn server
|
||||
]} *)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.19"
|
||||
version: "0.20"
|
||||
synopsis: "Minimal HTTP server using threads"
|
||||
maintainer: ["c-cube"]
|
||||
authors: ["c-cube"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.19"
|
||||
version: "0.20"
|
||||
synopsis: "Interface to camlzip for tiny_httpd"
|
||||
maintainer: ["c-cube"]
|
||||
authors: ["c-cube"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.19"
|
||||
version: "0.20"
|
||||
synopsis: "Use eio for tiny_httpd"
|
||||
maintainer: ["c-cube"]
|
||||
authors: ["c-cube"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue