Skip to content

Commit

Permalink
Merge pull request #13 from avsm/master
Browse files Browse the repository at this point in the history
0.9.16 (for real this time)
  • Loading branch information
avsm committed Feb 10, 2014
2 parents 09c2388 + 2e86b0d commit 5f532c7
Show file tree
Hide file tree
Showing 27 changed files with 203 additions and 663 deletions.
1 change: 1 addition & 0 deletions .ocp-indent
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
syntax=lwt
6 changes: 5 additions & 1 deletion .travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ opam install ${OPAM_DEPENDS}

eval `opam config env`
make
make test
#make test

# Test out some upstream users of Cohttp
opam pin cohttp .
opam install mirage-www
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.9.16 (2014-01-30):
* Add some module type equalities in `Cohttp_lwt_unix` so that
`Cohttp_lwt_unix.Server.Request.IO.ic` can be equivalen to `Lwt_io.input_channel`.
* Add sexp converters to most Cohttp types (#83).
* Improve Travis tests to cover more upstream users of Cohttp.
* Refactor build flags to let the portable Lwt-core be built independently of Lwt.unix.

0.9.15 (2014-01-11):
* Remove `Cohttp_mirage` libraries, which have now moved to `mirage/mirage-http-*` on GitHub.
* Add an "HTTP only" `Cookie` attribute (#69).
Expand Down
499 changes: 16 additions & 483 deletions LICENSE

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ all: build test doc
PREFIX ?= /usr/local
NAME=cohttp

LWT ?= $(shell if ocamlfind query lwt.ssl >/dev/null 2>&1; then echo --enable-lwt; fi)
LWT ?= $(shell if ocamlfind query lwt >/dev/null 2>&1; then echo --enable-lwt; fi)
LWT_UNIX ?= $(shell if ocamlfind query lwt.ssl >/dev/null 2>&1; then echo --enable-lwt-unix; fi)
ASYNC ?= $(shell if ocamlfind query async >/dev/null 2>&1; then echo --enable-async; fi)
MIRAGE_UNIX ?= $(shell if ocamlfind query mirage-tcpip-unix >/dev/null 2>&1; then echo --enable-mirage-unix; fi)
MIRAGE_XEN ?= $(shell if ocamlfind query mirage-tcpip-xen >/dev/null 2>&1; then echo --enable-mirage-xen; fi)
ifeq "$(findstring $(MIRAGE_OS),xen kfreebsd)" ""
TESTS ?= --enable-tests
endif
# disabled by default as they hang at the moment for Async
# NETTESTS ?= --enable-nettests

Expand All @@ -19,7 +15,7 @@ setup.bin: setup.ml
rm -f setup.cmx setup.cmi setup.o setup.cmo

setup.data: setup.bin
./setup.bin -configure $(LWT) $(ASYNC) $(MIRAGE_UNIX) $(MIRAGE_XEN) $(TESTS) $(NETTESTS) --prefix $(PREFIX)
./setup.bin -configure $(LWT) $(ASYNC) $(LWT_UNIX) $(TESTS) $(NETTESTS) --prefix $(PREFIX)

build: setup.data setup.bin
./setup.bin -build -classic-display
Expand Down
44 changes: 20 additions & 24 deletions _oasis
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OASISFormat: 0.3
Name: cohttp
Version: 0.9.15
Version: 0.9.16
Synopsis: HTTP library for Lwt, Async and Mirage
Authors: Anil Madhavapeddy, Stefano Zacchiroli, David Sheets, Thomas Gazagnaire, David Scott, Rudy Grinberg
License: ISC
Expand All @@ -13,40 +13,36 @@ Library cohttp
Pack: true
Modules: IO, Code, Header, Cookie, Request, Response, Transfer, Accept, Accept_parser,
Accept_lexer, Accept_types, Base64, Auth, Header_io, Transfer_io, Client, Connection
BuildDepends: re, uri (>= 1.3.8), uri.services, fieldslib, fieldslib.syntax
BuildDepends: re, uri (>= 1.3.8), uri.services, fieldslib, fieldslib.syntax, sexplib, sexplib.syntax

Flag lwt
Description: build the Lwt library
Default: false

Flag async
Description: build the Core/Async library
Flag lwt_unix
Description: build the Lwt-unix library
Default: false

Flag mirage_unix
Description: build the Mirage library for Unix
Default: false

Flag mirage_xen
Description: build the Mirage library for Xen
Flag async
Description: build the Core/Async library
Default: false

Flag nettests
Description: run the internet-using tests
Default: false

Library cohttp_lwt
Build$: flag(lwt ) || flag(mirage_unix) || flag(mirage_xen)
Install$: flag(lwt) || flag(mirage_unix) || flag(mirage_xen)
Build$: flag(lwt)
Install$: flag(lwt)
Path: lwt
Findlibname: lwt-core
FindlibParent: cohttp
BuildDepends: lwt, uri, cohttp, lwt.syntax
Modules: Cohttp_lwt_body, Cohttp_lwt

Library cohttp_lwt_unix
Build$: flag(lwt)
Install$: flag(lwt)
Build$: flag(lwt_unix)
Install$: flag(lwt_unix)
Path: lwt
Findlibname: lwt
FindlibParent: cohttp
Expand Down Expand Up @@ -74,7 +70,7 @@ Document cohttp_lwt_unix
Title: Cohttp Lwt UNIX docs
Type: ocamlbuild (0.3)
BuildTools+: ocamldoc
Build$: flag(lwt)
Build$: flag(lwt_unix)
Install: true
XOCamlbuildPath: lwt
XOCamlbuildLibraries: cohttp.lwt
Expand All @@ -91,7 +87,7 @@ Document cohttp_async
Executable test_parser
Path: lib_test
MainIs: test_parser.ml
Build$: flag(tests) && flag(lwt)
Build$: flag(tests) && flag(lwt_unix)
Custom: true
CompiledObject: best
Install: false
Expand All @@ -118,7 +114,7 @@ Executable test_header
Executable test_net_lwt
Path: lib_test
MainIs: test_net_lwt.ml
Build$: flag(tests) && flag(lwt)
Build$: flag(tests) && flag(lwt_unix)
Custom: true
CompiledObject: best
Install: false
Expand All @@ -127,7 +123,7 @@ Executable test_net_lwt
Executable test_net_lwt_google
Path: lib_test
MainIs: test_net_lwt_google.ml
Build$: flag(tests) && flag(lwt)
Build$: flag(tests) && flag(lwt_unix)
Custom: true
CompiledObject: best
Install: false
Expand All @@ -136,7 +132,7 @@ Executable test_net_lwt_google
Executable test_net_lwt_lastminute
Path: lib_test
MainIs: test_net_lwt_lastminute.ml
Build$: flag(tests) && flag(lwt)
Build$: flag(tests) && flag(lwt_unix)
Custom: true
CompiledObject: best
Install: false
Expand All @@ -145,7 +141,7 @@ Executable test_net_lwt_lastminute
Executable test_net_lwt_server
Path: lib_test
MainIs: test_net_lwt_server.ml
Build$: flag(tests) && flag(lwt)
Build$: flag(tests) && flag(lwt_unix)
Custom: true
CompiledObject: best
Install: false
Expand All @@ -154,7 +150,7 @@ Executable test_net_lwt_server
Executable test_net_lwt_multi_get
Path: lib_test
MainIs: test_net_lwt_multi_get.ml
Build$: flag(tests) && flag(lwt)
Build$: flag(tests) && flag(lwt_unix)
Custom: true
CompiledObject: best
Install: false
Expand All @@ -163,7 +159,7 @@ Executable test_net_lwt_multi_get
Executable test_net_lwt_client_and_server
Path: lib_test
MainIs: test_net_lwt_client_and_server.ml
Build$: flag(tests) && flag(lwt)
Build$: flag(tests) && flag(lwt_unix)
Custom: true
CompiledObject: best
Install: false
Expand Down Expand Up @@ -225,12 +221,12 @@ Test test_header
WorkingDirectory: lib_test

Test test_parser
Run$: flag(tests) && flag(lwt)
Run$: flag(tests) && flag(lwt_unix)
Command: $test_parser
WorkingDirectory: lib_test

Test test_net_lwt
Run$: flag(nettests) && flag(lwt)
Run$: flag(nettests) && flag(lwt_unix)
Command: $test_net_lwt
WorkingDirectory: lib_test

Expand Down
40 changes: 39 additions & 1 deletion _tags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: d6d7846f359008f884c46f27d8e4b33a)
# DO NOT EDIT (digest: 1ff0e28ed44ab8fbe9000e26aee14bcb)
# 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 Down Expand Up @@ -37,6 +37,8 @@
<cohttp/*.ml{,i}>: pkg_uri.services
<cohttp/*.ml{,i}>: pkg_fieldslib
<cohttp/*.ml{,i}>: pkg_fieldslib.syntax
<cohttp/*.ml{,i}>: pkg_sexplib
<cohttp/*.ml{,i}>: pkg_sexplib.syntax
# Library cohttp_lwt
"lwt/cohttp_lwt.cmxs": use_cohttp_lwt
# Library cohttp_lwt_unix
Expand All @@ -53,6 +55,8 @@
<lwt/*.ml{,i}>: pkg_uri.services
<lwt/*.ml{,i}>: pkg_fieldslib
<lwt/*.ml{,i}>: pkg_fieldslib.syntax
<lwt/*.ml{,i}>: pkg_sexplib
<lwt/*.ml{,i}>: pkg_sexplib.syntax
# Library cohttp_async
"async/cohttp_async.cmxs": use_cohttp_async
<async/*.ml{,i}>: use_cohttp
Expand All @@ -63,6 +67,8 @@
<async/*.ml{,i}>: pkg_uri.services
<async/*.ml{,i}>: pkg_fieldslib
<async/*.ml{,i}>: pkg_fieldslib.syntax
<async/*.ml{,i}>: pkg_sexplib
<async/*.ml{,i}>: pkg_sexplib.syntax
# Executable test_parser
<lib_test/test_parser.{native,byte}>: use_cohttp_lwt_unix
<lib_test/test_parser.{native,byte}>: use_cohttp_lwt
Expand All @@ -78,6 +84,8 @@
<lib_test/test_parser.{native,byte}>: pkg_uri.services
<lib_test/test_parser.{native,byte}>: pkg_fieldslib
<lib_test/test_parser.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_parser.{native,byte}>: pkg_sexplib
<lib_test/test_parser.{native,byte}>: pkg_sexplib.syntax
<lib_test/test_parser.{native,byte}>: custom
# Executable test_accept
<lib_test/test_accept.{native,byte}>: use_cohttp
Expand All @@ -87,6 +95,8 @@
<lib_test/test_accept.{native,byte}>: pkg_uri.services
<lib_test/test_accept.{native,byte}>: pkg_fieldslib
<lib_test/test_accept.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_accept.{native,byte}>: pkg_sexplib
<lib_test/test_accept.{native,byte}>: pkg_sexplib.syntax
<lib_test/test_accept.{native,byte}>: custom
# Executable test_header
<lib_test/test_header.{native,byte}>: use_cohttp
Expand All @@ -96,6 +106,8 @@
<lib_test/test_header.{native,byte}>: pkg_uri.services
<lib_test/test_header.{native,byte}>: pkg_fieldslib
<lib_test/test_header.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_header.{native,byte}>: pkg_sexplib
<lib_test/test_header.{native,byte}>: pkg_sexplib.syntax
<lib_test/test_header.{native,byte}>: custom
# Executable test_net_lwt
<lib_test/test_net_lwt.{native,byte}>: use_cohttp_lwt_unix
Expand All @@ -112,6 +124,8 @@
<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}>: pkg_sexplib
<lib_test/test_net_lwt.{native,byte}>: pkg_sexplib.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
Expand All @@ -127,6 +141,8 @@
<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}>: pkg_sexplib
<lib_test/test_net_lwt_google.{native,byte}>: pkg_sexplib.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
Expand All @@ -142,6 +158,8 @@
<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}>: pkg_sexplib
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_sexplib.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
Expand All @@ -157,6 +175,8 @@
<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}>: pkg_sexplib
<lib_test/test_net_lwt_server.{native,byte}>: pkg_sexplib.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
Expand All @@ -172,6 +192,8 @@
<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}>: pkg_sexplib
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_sexplib.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
Expand All @@ -187,6 +209,8 @@
<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/test_net_lwt_client_and_server.{native,byte}>: pkg_sexplib
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_sexplib.syntax
<lib_test/*.ml{,i}>: use_cohttp_lwt_unix
<lib_test/*.ml{,i}>: use_cohttp_lwt
<lib_test/*.ml{,i}>: pkg_unix
Expand All @@ -206,6 +230,8 @@
<lib_test/test_net_async.{native,byte}>: pkg_uri.services
<lib_test/test_net_async.{native,byte}>: pkg_fieldslib
<lib_test/test_net_async.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_async.{native,byte}>: pkg_sexplib
<lib_test/test_net_async.{native,byte}>: pkg_sexplib.syntax
<lib_test/test_net_async.{native,byte}>: custom
# Executable test_net_async_http10
<lib_test/test_net_async_http10.{native,byte}>: use_cohttp_async
Expand All @@ -218,6 +244,8 @@
<lib_test/test_net_async_http10.{native,byte}>: pkg_uri.services
<lib_test/test_net_async_http10.{native,byte}>: pkg_fieldslib
<lib_test/test_net_async_http10.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_async_http10.{native,byte}>: pkg_sexplib
<lib_test/test_net_async_http10.{native,byte}>: pkg_sexplib.syntax
<lib_test/test_net_async_http10.{native,byte}>: custom
# Executable test_net_async_multi_get
<lib_test/test_net_async_multi_get.{native,byte}>: use_cohttp_async
Expand All @@ -230,6 +258,8 @@
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_uri.services
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_fieldslib
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_sexplib
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_sexplib.syntax
<lib_test/test_net_async_multi_get.{native,byte}>: custom
# Executable test_net_async_server
<lib_test/test_net_async_server.{native,byte}>: use_cohttp_async
Expand All @@ -242,6 +272,8 @@
<lib_test/test_net_async_server.{native,byte}>: pkg_uri.services
<lib_test/test_net_async_server.{native,byte}>: pkg_fieldslib
<lib_test/test_net_async_server.{native,byte}>: pkg_fieldslib.syntax
<lib_test/test_net_async_server.{native,byte}>: pkg_sexplib
<lib_test/test_net_async_server.{native,byte}>: pkg_sexplib.syntax
<lib_test/*.ml{,i}>: use_cohttp_async
<lib_test/*.ml{,i}>: use_cohttp
<lib_test/*.ml{,i}>: pkg_oUnit
Expand All @@ -252,6 +284,8 @@
<lib_test/*.ml{,i}>: pkg_uri.services
<lib_test/*.ml{,i}>: pkg_fieldslib
<lib_test/*.ml{,i}>: pkg_fieldslib.syntax
<lib_test/*.ml{,i}>: pkg_sexplib
<lib_test/*.ml{,i}>: pkg_sexplib.syntax
<lib_test/test_net_async_server.{native,byte}>: custom
# Executable cohttp-server
<bin/cohttp_server_async.{native,byte}>: use_cohttp_async
Expand All @@ -263,6 +297,8 @@
<bin/cohttp_server_async.{native,byte}>: pkg_uri.services
<bin/cohttp_server_async.{native,byte}>: pkg_fieldslib
<bin/cohttp_server_async.{native,byte}>: pkg_fieldslib.syntax
<bin/cohttp_server_async.{native,byte}>: pkg_sexplib
<bin/cohttp_server_async.{native,byte}>: pkg_sexplib.syntax
<bin/*.ml{,i}>: use_cohttp_async
<bin/*.ml{,i}>: use_cohttp
<bin/*.ml{,i}>: pkg_uri
Expand All @@ -272,6 +308,8 @@
<bin/*.ml{,i}>: pkg_uri.services
<bin/*.ml{,i}>: pkg_fieldslib
<bin/*.ml{,i}>: pkg_fieldslib.syntax
<bin/*.ml{,i}>: pkg_sexplib
<bin/*.ml{,i}>: pkg_sexplib.syntax
<bin/cohttp_server_async.{native,byte}>: custom
# OASIS_STOP
true: annot, bin_annot, debug, strict_sequence, principal

0 comments on commit 5f532c7

Please sign in to comment.