mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-07 11:45:36 -05:00
rename into tiny_httpd_camlzip
This commit is contained in:
parent
8131c07425
commit
a238a2100b
7 changed files with 12 additions and 12 deletions
7
src/camlzip/dune
Normal file
7
src/camlzip/dune
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name tiny_httpd_camlzip)
|
||||||
|
(public_name tiny_httpd_camlzip)
|
||||||
|
(synopsis "A wrapper around camlzip to bring compression to Tiny_httpd")
|
||||||
|
(flags :standard -safe-string -warn-error -a)
|
||||||
|
(libraries tiny_httpd camlzip))
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
(executables
|
(executables
|
||||||
(names echo)
|
(names echo)
|
||||||
(libraries tiny_httpd tiny_httpd_zlib))
|
(libraries tiny_httpd tiny_httpd_camlzip))
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ let () =
|
||||||
"-j", Arg.Set_int j, " maximum number of connections";
|
"-j", Arg.Set_int j, " maximum number of connections";
|
||||||
]) (fun _ -> raise (Arg.Bad "")) "echo [option]*";
|
]) (fun _ -> raise (Arg.Bad "")) "echo [option]*";
|
||||||
let server = S.create ~port:!port_ ~max_connections:!j () in
|
let server = S.create ~port:!port_ ~max_connections:!j () in
|
||||||
Tiny_httpd_zlib.setup server;
|
Tiny_httpd_camlzip.setup server;
|
||||||
(* say hello *)
|
(* say hello *)
|
||||||
S.add_path_handler ~meth:`GET server
|
S.add_path_handler ~meth:`GET server
|
||||||
"/hello/%s@/" (fun name _req -> S.Response.make_string (Ok ("hello " ^name ^"!\n")));
|
"/hello/%s@/" (fun name _req -> S.Response.make_string (Ok ("hello " ^name ^"!\n")));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
(name tiny_httpd_zlib)
|
|
||||||
(public_name tiny_httpd_zlib)
|
|
||||||
(synopsis "A wrapper around zlib to bring compression to Tiny_httpd")
|
|
||||||
(flags :standard -safe-string -warn-error -a)
|
|
||||||
(libraries tiny_httpd camlzip))
|
|
||||||
|
|
@ -3,7 +3,7 @@ version: "0.1"
|
||||||
authors: ["Simon Cruanes"]
|
authors: ["Simon Cruanes"]
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "MIT"
|
license: "MIT"
|
||||||
description: "Interface to gzip for tiny_httpd"
|
description: "Interface to camlzip for tiny_httpd"
|
||||||
build: [
|
build: [
|
||||||
["dune" "build" "@install" "-p" name "-j" jobs]
|
["dune" "build" "@install" "-p" name "-j" jobs]
|
||||||
["dune" "build" "@doc" "-p" name] {with-doc}
|
["dune" "build" "@doc" "-p" name] {with-doc}
|
||||||
|
|
@ -11,12 +11,12 @@ build: [
|
||||||
]
|
]
|
||||||
depends: [
|
depends: [
|
||||||
"dune" { >= "1.1" }
|
"dune" { >= "1.1" }
|
||||||
"decompress"
|
"camlzip"
|
||||||
"tiny_httpd" { = version }
|
"tiny_httpd" { = version }
|
||||||
"ocaml" { >= "4.03.0" }
|
"ocaml" { >= "4.03.0" }
|
||||||
"odoc" {with-doc}
|
"odoc" {with-doc}
|
||||||
]
|
]
|
||||||
tags: [ "http" "thread" "server" "gzip" "decompress" ]
|
tags: [ "http" "thread" "server" "gzip" "camlzip" ]
|
||||||
homepage: "https://github.com/c-cube/tiny_httpd/"
|
homepage: "https://github.com/c-cube/tiny_httpd/"
|
||||||
doc: "https://c-cube.github.io/tiny_httpd/"
|
doc: "https://c-cube.github.io/tiny_httpd/"
|
||||||
bug-reports: "https://github.com/c-cube/tiny_httpd/issues"
|
bug-reports: "https://github.com/c-cube/tiny_httpd/issues"
|
||||||
Loading…
Add table
Reference in a new issue