Skip to content

Commit

Permalink
Merge pull request #8 from avsm/master
Browse files Browse the repository at this point in the history
Updates for Mirage 1.0
  • Loading branch information
avsm committed Dec 11, 2013
2 parents c94d94f + 42610e2 commit 7e128fc
Show file tree
Hide file tree
Showing 17 changed files with 145 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .travis-ci.sh
@@ -1,4 +1,4 @@
OPAM_DEPENDS="lwt async ssl uri re"
OPAM_DEPENDS="lwt async ssl uri re mirage-tcpip-unix mirage-tcpip-xen"

case "$OCAML_VERSION,$OPAM_VERSION" in
4.00.1,1.0.0) ppa=avsm/ocaml40+opam10 ;;
Expand All @@ -20,7 +20,7 @@ echo OPAM versions
opam --version
opam --git-version

opam init
opam init git://github.com/ocaml/opam-repository >/dev/null 2>&1
opam install ${OPAM_DEPENDS}

eval `opam config env`
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
@@ -1,7 +1,5 @@
language: c
script: bash -ex .travis-ci.sh
env:
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.0.0
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0
- OCAML_VERSION=4.00.1 OPAM_VERSION=1.0.0
- OCAML_VERSION=4.00.1 OPAM_VERSION=1.1.0
8 changes: 5 additions & 3 deletions CHANGES
@@ -1,7 +1,9 @@
0.9.13
* Fix the support of mirage.1.0
0.9.13 (2013-12-10):
* The `cohttp.lwt-core` is now installed as an OS-independent Lwt library.
* Add support for Mirage 1.0, via `cohttp.mirage-unix` and `cohttp.mirage-xen`.
* Add a new `Cohttp.Connection` module to manage server's connections identifiers.
* Share the same configuration type for the different server implementations
* Share the same configuration type for the different server implementations.
* Add `Accept_types` module to the `Cohttp` pack.

0.9.12 (2013-11-28):
* Improve documentation for `Cohttp.Header`.
Expand Down
23 changes: 16 additions & 7 deletions _oasis
Expand Up @@ -12,7 +12,7 @@ Library cohttp
Findlibname: cohttp
Pack: true
Modules: IO, Code, Header, Cookie, Request, Response, Transfer, Accept, Accept_parser,
Accept_lexer, Base64, Auth, Header_io, Transfer_io, Client, Connection
Accept_lexer, Accept_types, Base64, Auth, Header_io, Transfer_io, Client, Connection
BuildDepends: re, uri (>= 1.3.8), uri.services, fieldslib, fieldslib.syntax

Flag lwt
Expand All @@ -39,18 +39,18 @@ Library cohttp_lwt
Build$: flag(lwt ) || flag(mirage_unix) || flag(mirage_xen)
Install$: flag(lwt) || flag(mirage_unix) || flag(mirage_xen)
Path: lwt
Findlibname: lwt
Findlibname: lwt-core
FindlibParent: cohttp
BuildDepends: lwt, uri, cohttp, lwt.ssl, lwt.syntax
BuildDepends: lwt, uri, cohttp, lwt.syntax
Modules: Cohttp_lwt_body, Cohttp_lwt

Library cohttp_lwt_unix
Build$: flag(lwt)
Install$: flag(lwt)
Path: lwt
Findlibname: lwt-unix
Findlibname: lwt
FindlibParent: cohttp
BuildDepends: cohttp.lwt, unix
BuildDepends: cohttp.lwt-core, unix, lwt.unix, lwt.ssl
Modules: Cohttp_lwt_unix_io, Cohttp_lwt_unix, Cohttp_lwt_unix_net

Library cohttp_mirage_unix
Expand All @@ -59,7 +59,7 @@ Library cohttp_mirage_unix
Path: mirage
Findlibname: mirage-unix
FindlibParent: cohttp
BuildDepends: cohttp.lwt, mirage-types, cstruct, mirage-tcpip-unix
BuildDepends: cohttp.lwt-core, mirage-types, cstruct, mirage-tcpip-unix
Modules: Cohttp_mirage_io, Cohttp_mirage

Library cohttp_mirage_xen
Expand All @@ -68,7 +68,7 @@ Library cohttp_mirage_xen
Path: mirage
Findlibname: mirage-xen
FindlibParent: cohttp
BuildDepends: cohttp.lwt, mirage-types, cstruct, mirage-tcpip-xen
BuildDepends: cohttp.lwt-core, mirage-types, cstruct, mirage-tcpip-xen
Modules: Cohttp_mirage_io, Cohttp_mirage

Library cohttp_async
Expand Down Expand Up @@ -241,6 +241,15 @@ Executable test_net_async_server
Install: false
BuildDepends: cohttp, cohttp.async, oUnit (>= 1.0.2)

#Executable "cohttp-async-server"
# Path: bin
# MainIs: cohttp_server_async.ml
# Build$: flag(tests) && flag(async)
# Custom: true
# CompiledObject: best
# Install: true
# BuildDepends: cohttp, cohttp.async

Test test_accept
Run$: flag(tests)
Command: $test_accept
Expand Down
47 changes: 36 additions & 11 deletions _tags
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: f8251effdafe1a1905cf26b099fa8bc4)
# DO NOT EDIT (digest: 191919a1b412de614ac25c71f18ab0da)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
Expand All @@ -25,6 +25,7 @@
"cohttp/accept.cmx": for-pack(Cohttp)
"cohttp/accept_parser.cmx": for-pack(Cohttp)
"cohttp/accept_lexer.cmx": for-pack(Cohttp)
"cohttp/accept_types.cmx": for-pack(Cohttp)
"cohttp/base64.cmx": for-pack(Cohttp)
"cohttp/auth.cmx": for-pack(Cohttp)
"cohttp/header_io.cmx": for-pack(Cohttp)
Expand All @@ -44,8 +45,9 @@
<lwt/*.ml{,i}>: use_cohttp
<lwt/*.ml{,i}>: pkg_uri
<lwt/*.ml{,i}>: pkg_unix
<lwt/*.ml{,i}>: pkg_lwt
<lwt/*.ml{,i}>: pkg_lwt.unix
<lwt/*.ml{,i}>: pkg_lwt.ssl
<lwt/*.ml{,i}>: pkg_lwt
<lwt/*.ml{,i}>: pkg_lwt.syntax
<lwt/*.ml{,i}>: pkg_re
<lwt/*.ml{,i}>: pkg_uri.services
Expand All @@ -63,7 +65,6 @@
<mirage/*.ml{,i}>: pkg_cstruct
<mirage/*.ml{,i}>: pkg_mirage-tcpip-xen
<mirage/*.ml{,i}>: pkg_lwt
<mirage/*.ml{,i}>: pkg_lwt.ssl
<mirage/*.ml{,i}>: pkg_lwt.syntax
<mirage/*.ml{,i}>: pkg_re
<mirage/*.ml{,i}>: pkg_uri.services
Expand All @@ -82,12 +83,15 @@
<async/*.ml{,i}>: pkg_fieldslib
<async/*.ml{,i}>: pkg_fieldslib.syntax
# Executable test_parser
<lib_test/test_parser.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_parser.{native,byte}>: use_cohttp_lwt
<lib_test/test_parser.{native,byte}>: use_cohttp
<lib_test/test_parser.{native,byte}>: pkg_oUnit
<lib_test/test_parser.{native,byte}>: pkg_uri
<lib_test/test_parser.{native,byte}>: pkg_lwt
<lib_test/test_parser.{native,byte}>: pkg_unix
<lib_test/test_parser.{native,byte}>: pkg_lwt.unix
<lib_test/test_parser.{native,byte}>: pkg_lwt.ssl
<lib_test/test_parser.{native,byte}>: pkg_lwt
<lib_test/test_parser.{native,byte}>: pkg_lwt.syntax
<lib_test/test_parser.{native,byte}>: pkg_re
<lib_test/test_parser.{native,byte}>: pkg_uri.services
Expand All @@ -113,80 +117,101 @@
<lib_test/test_header.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_header.{native,byte}>: custom
# Executable test_net_lwt
<lib_test/test_net_lwt.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_net_lwt.{native,byte}>: use_cohttp_lwt
<lib_test/test_net_lwt.{native,byte}>: use_cohttp
<lib_test/test_net_lwt.{native,byte}>: pkg_oUnit
<lib_test/test_net_lwt.{native,byte}>: pkg_uri
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt.{native,byte}>: pkg_unix
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt.unix
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt.ssl
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt.syntax
<lib_test/test_net_lwt.{native,byte}>: pkg_re
<lib_test/test_net_lwt.{native,byte}>: pkg_uri.services
<lib_test/test_net_lwt.{native,byte}>: pkg_fieldslib
<lib_test/test_net_lwt.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_lwt.{native,byte}>: custom
# Executable test_net_lwt_google
<lib_test/test_net_lwt_google.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_net_lwt_google.{native,byte}>: use_cohttp_lwt
<lib_test/test_net_lwt_google.{native,byte}>: use_cohttp
<lib_test/test_net_lwt_google.{native,byte}>: pkg_uri
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_google.{native,byte}>: pkg_unix
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt.unix
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt.ssl
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt.syntax
<lib_test/test_net_lwt_google.{native,byte}>: pkg_re
<lib_test/test_net_lwt_google.{native,byte}>: pkg_uri.services
<lib_test/test_net_lwt_google.{native,byte}>: pkg_fieldslib
<lib_test/test_net_lwt_google.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_lwt_google.{native,byte}>: custom
# Executable test_net_lwt_lastminute
<lib_test/test_net_lwt_lastminute.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_net_lwt_lastminute.{native,byte}>: use_cohttp_lwt
<lib_test/test_net_lwt_lastminute.{native,byte}>: use_cohttp
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_uri
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_unix
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt.unix
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt.ssl
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt.syntax
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_re
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_uri.services
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_fieldslib
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_lwt_lastminute.{native,byte}>: custom
# Executable test_net_lwt_server
<lib_test/test_net_lwt_server.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_net_lwt_server.{native,byte}>: use_cohttp_lwt
<lib_test/test_net_lwt_server.{native,byte}>: use_cohttp
<lib_test/test_net_lwt_server.{native,byte}>: pkg_uri
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_server.{native,byte}>: pkg_unix
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt.unix
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt.ssl
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt.syntax
<lib_test/test_net_lwt_server.{native,byte}>: pkg_re
<lib_test/test_net_lwt_server.{native,byte}>: pkg_uri.services
<lib_test/test_net_lwt_server.{native,byte}>: pkg_fieldslib
<lib_test/test_net_lwt_server.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_lwt_server.{native,byte}>: custom
# Executable test_net_lwt_multi_get
<lib_test/test_net_lwt_multi_get.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_net_lwt_multi_get.{native,byte}>: use_cohttp_lwt
<lib_test/test_net_lwt_multi_get.{native,byte}>: use_cohttp
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_uri
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_unix
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt.unix
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt.ssl
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt.syntax
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_re
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_uri.services
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_fieldslib
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_lwt_multi_get.{native,byte}>: custom
# Executable test_net_lwt_client_and_server
<lib_test/test_net_lwt_client_and_server.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_net_lwt_client_and_server.{native,byte}>: use_cohttp_lwt
<lib_test/test_net_lwt_client_and_server.{native,byte}>: use_cohttp
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_uri
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_unix
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt.unix
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt.ssl
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt.syntax
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_re
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_uri.services
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_fieldslib
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_fieldslib.syntax
<lib_test/*.ml{,i}>: use_cohttp_lwt_unix
<lib_test/*.ml{,i}>: use_cohttp_lwt
<lib_test/*.ml{,i}>: pkg_lwt
<lib_test/*.ml{,i}>: pkg_unix
<lib_test/*.ml{,i}>: pkg_lwt.unix
<lib_test/*.ml{,i}>: pkg_lwt.ssl
<lib_test/*.ml{,i}>: pkg_lwt
<lib_test/*.ml{,i}>: pkg_lwt.syntax
<lib_test/test_net_lwt_client_and_server.{native,byte}>: custom
# Executable test_net_async
Expand Down
32 changes: 16 additions & 16 deletions cohttp/META
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: e8c64c9b3292a138de28a835495f0188)
# DO NOT EDIT (digest: 5ef394ff982ae649a5fec90a7b6a6298)
version = "0.9.13"
description = "HTTP library for Lwt, Async and Mirage"
requires = "re uri uri.services fieldslib fieldslib.syntax"
Expand All @@ -11,7 +11,7 @@ exists_if = "cohttp.cma"
package "mirage-xen" (
version = "0.9.13"
description = "HTTP library for Lwt, Async and Mirage"
requires = "cohttp.lwt mirage-types cstruct mirage-tcpip-xen"
requires = "cohttp.lwt-core mirage-types cstruct mirage-tcpip-xen"
archive(byte) = "cohttp_mirage_xen.cma"
archive(byte, plugin) = "cohttp_mirage_xen.cma"
archive(native) = "cohttp_mirage_xen.cmxa"
Expand All @@ -22,36 +22,36 @@ package "mirage-xen" (
package "mirage-unix" (
version = "0.9.13"
description = "HTTP library for Lwt, Async and Mirage"
requires = "cohttp.lwt mirage-types cstruct mirage-tcpip-unix"
requires = "cohttp.lwt-core mirage-types cstruct mirage-tcpip-unix"
archive(byte) = "cohttp_mirage_unix.cma"
archive(byte, plugin) = "cohttp_mirage_unix.cma"
archive(native) = "cohttp_mirage_unix.cmxa"
archive(native, plugin) = "cohttp_mirage_unix.cmxs"
exists_if = "cohttp_mirage_unix.cma"
)

package "lwt-unix" (
package "lwt-core" (
version = "0.9.13"
description = "HTTP library for Lwt, Async and Mirage"
requires = "cohttp.lwt unix"
archive(byte) = "cohttp_lwt_unix.cma"
archive(byte, plugin) = "cohttp_lwt_unix.cma"
archive(native) = "cohttp_lwt_unix.cmxa"
archive(native, plugin) = "cohttp_lwt_unix.cmxs"
exists_if = "cohttp_lwt_unix.cma"
)

package "lwt" (
version = "0.9.13"
description = "HTTP library for Lwt, Async and Mirage"
requires = "lwt uri cohttp lwt.ssl lwt.syntax"
requires = "lwt uri cohttp lwt.syntax"
archive(byte) = "cohttp_lwt.cma"
archive(byte, plugin) = "cohttp_lwt.cma"
archive(native) = "cohttp_lwt.cmxa"
archive(native, plugin) = "cohttp_lwt.cmxs"
exists_if = "cohttp_lwt.cma"
)

package "lwt" (
version = "0.9.13"
description = "HTTP library for Lwt, Async and Mirage"
requires = "cohttp.lwt-core unix lwt.unix lwt.ssl"
archive(byte) = "cohttp_lwt_unix.cma"
archive(byte, plugin) = "cohttp_lwt_unix.cma"
archive(native) = "cohttp_lwt_unix.cmxa"
archive(native, plugin) = "cohttp_lwt_unix.cmxs"
exists_if = "cohttp_lwt_unix.cma"
)

package "async" (
version = "0.9.13"
description = "HTTP library for Lwt, Async and Mirage"
Expand Down
16 changes: 16 additions & 0 deletions cohttp/cohttp.mldylib
@@ -0,0 +1,16 @@
IO
Code
Header
Cookie
Request
Response
Transfer
Accept
Accept_parser
Accept_lexer
Accept_types
Base64
Auth
Header_io
Transfer_io
Client
3 changes: 2 additions & 1 deletion cohttp/cohttp.mlpack
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 56ef89c77c32f281c432c51a5902e462)
# DO NOT EDIT (digest: 3769fb724d2bccd4b260798f01b6c3c9)
IO
Code
Header
Expand All @@ -10,6 +10,7 @@ Transfer
Accept
Accept_parser
Accept_lexer
Accept_types
Base64
Auth
Header_io
Expand Down
3 changes: 2 additions & 1 deletion cohttp/cohttp.odocl
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 56ef89c77c32f281c432c51a5902e462)
# DO NOT EDIT (digest: 3769fb724d2bccd4b260798f01b6c3c9)
IO
Code
Header
Expand All @@ -10,6 +10,7 @@ Transfer
Accept
Accept_parser
Accept_lexer
Accept_types
Base64
Auth
Header_io
Expand Down
5 changes: 5 additions & 0 deletions lwt/cohttp_lwt.mllib
@@ -0,0 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: d29c59c25fc65c5c230d2d1ac584439a)
Cohttp_lwt_body
Cohttp_lwt
# OASIS_STOP
5 changes: 5 additions & 0 deletions lwt/cohttp_lwt_unix.mldylib
@@ -0,0 +1,5 @@
Cohttp_lwt_unix_io
Cohttp_lwt_unix
Cohttp_lwt
Cohttp_lwt_body
Cohttp_lwt_unix_net
7 changes: 4 additions & 3 deletions lwt/cohttp_lwt_unix.odocl
@@ -1,5 +1,6 @@
# OASIS_START
# DO NOT EDIT (digest: d29c59c25fc65c5c230d2d1ac584439a)
Cohttp_lwt_body
Cohttp_lwt
# DO NOT EDIT (digest: 6e23765af0b0e0b9d610247caf90063c)
Cohttp_lwt_unix_io
Cohttp_lwt_unix
Cohttp_lwt_unix_net
# OASIS_STOP

0 comments on commit 7e128fc

Please sign in to comment.