Skip to content

Commit 5f532c7

Browse files
committed
Merge pull request #13 from avsm/master
0.9.16 (for real this time)
2 parents 09c2388 + 2e86b0d commit 5f532c7

27 files changed

+203
-663
lines changed

.ocp-indent

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
syntax=lwt

.travis-ci.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ opam install ${OPAM_DEPENDS}
2626

2727
eval `opam config env`
2828
make
29-
make test
29+
#make test
30+
31+
# Test out some upstream users of Cohttp
32+
opam pin cohttp .
33+
opam install mirage-www

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
0.9.16 (2014-01-30):
2+
* Add some module type equalities in `Cohttp_lwt_unix` so that
3+
`Cohttp_lwt_unix.Server.Request.IO.ic` can be equivalen to `Lwt_io.input_channel`.
4+
* Add sexp converters to most Cohttp types (#83).
5+
* Improve Travis tests to cover more upstream users of Cohttp.
6+
* Refactor build flags to let the portable Lwt-core be built independently of Lwt.unix.
7+
18
0.9.15 (2014-01-11):
29
* Remove `Cohttp_mirage` libraries, which have now moved to `mirage/mirage-http-*` on GitHub.
310
* Add an "HTTP only" `Cookie` attribute (#69).

LICENSE

Lines changed: 16 additions & 483 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ all: build test doc
44
PREFIX ?= /usr/local
55
NAME=cohttp
66

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

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

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

2420
build: setup.data setup.bin
2521
./setup.bin -build -classic-display

_oasis

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OASISFormat: 0.3
22
Name: cohttp
3-
Version: 0.9.15
3+
Version: 0.9.16
44
Synopsis: HTTP library for Lwt, Async and Mirage
55
Authors: Anil Madhavapeddy, Stefano Zacchiroli, David Sheets, Thomas Gazagnaire, David Scott, Rudy Grinberg
66
License: ISC
@@ -13,40 +13,36 @@ Library cohttp
1313
Pack: true
1414
Modules: IO, Code, Header, Cookie, Request, Response, Transfer, Accept, Accept_parser,
1515
Accept_lexer, Accept_types, Base64, Auth, Header_io, Transfer_io, Client, Connection
16-
BuildDepends: re, uri (>= 1.3.8), uri.services, fieldslib, fieldslib.syntax
16+
BuildDepends: re, uri (>= 1.3.8), uri.services, fieldslib, fieldslib.syntax, sexplib, sexplib.syntax
1717

1818
Flag lwt
1919
Description: build the Lwt library
2020
Default: false
2121

22-
Flag async
23-
Description: build the Core/Async library
22+
Flag lwt_unix
23+
Description: build the Lwt-unix library
2424
Default: false
2525

26-
Flag mirage_unix
27-
Description: build the Mirage library for Unix
28-
Default: false
29-
30-
Flag mirage_xen
31-
Description: build the Mirage library for Xen
26+
Flag async
27+
Description: build the Core/Async library
3228
Default: false
3329

3430
Flag nettests
3531
Description: run the internet-using tests
3632
Default: false
3733

3834
Library cohttp_lwt
39-
Build$: flag(lwt ) || flag(mirage_unix) || flag(mirage_xen)
40-
Install$: flag(lwt) || flag(mirage_unix) || flag(mirage_xen)
35+
Build$: flag(lwt)
36+
Install$: flag(lwt)
4137
Path: lwt
4238
Findlibname: lwt-core
4339
FindlibParent: cohttp
4440
BuildDepends: lwt, uri, cohttp, lwt.syntax
4541
Modules: Cohttp_lwt_body, Cohttp_lwt
4642

4743
Library cohttp_lwt_unix
48-
Build$: flag(lwt)
49-
Install$: flag(lwt)
44+
Build$: flag(lwt_unix)
45+
Install$: flag(lwt_unix)
5046
Path: lwt
5147
Findlibname: lwt
5248
FindlibParent: cohttp
@@ -74,7 +70,7 @@ Document cohttp_lwt_unix
7470
Title: Cohttp Lwt UNIX docs
7571
Type: ocamlbuild (0.3)
7672
BuildTools+: ocamldoc
77-
Build$: flag(lwt)
73+
Build$: flag(lwt_unix)
7874
Install: true
7975
XOCamlbuildPath: lwt
8076
XOCamlbuildLibraries: cohttp.lwt
@@ -91,7 +87,7 @@ Document cohttp_async
9187
Executable test_parser
9288
Path: lib_test
9389
MainIs: test_parser.ml
94-
Build$: flag(tests) && flag(lwt)
90+
Build$: flag(tests) && flag(lwt_unix)
9591
Custom: true
9692
CompiledObject: best
9793
Install: false
@@ -118,7 +114,7 @@ Executable test_header
118114
Executable test_net_lwt
119115
Path: lib_test
120116
MainIs: test_net_lwt.ml
121-
Build$: flag(tests) && flag(lwt)
117+
Build$: flag(tests) && flag(lwt_unix)
122118
Custom: true
123119
CompiledObject: best
124120
Install: false
@@ -127,7 +123,7 @@ Executable test_net_lwt
127123
Executable test_net_lwt_google
128124
Path: lib_test
129125
MainIs: test_net_lwt_google.ml
130-
Build$: flag(tests) && flag(lwt)
126+
Build$: flag(tests) && flag(lwt_unix)
131127
Custom: true
132128
CompiledObject: best
133129
Install: false
@@ -136,7 +132,7 @@ Executable test_net_lwt_google
136132
Executable test_net_lwt_lastminute
137133
Path: lib_test
138134
MainIs: test_net_lwt_lastminute.ml
139-
Build$: flag(tests) && flag(lwt)
135+
Build$: flag(tests) && flag(lwt_unix)
140136
Custom: true
141137
CompiledObject: best
142138
Install: false
@@ -145,7 +141,7 @@ Executable test_net_lwt_lastminute
145141
Executable test_net_lwt_server
146142
Path: lib_test
147143
MainIs: test_net_lwt_server.ml
148-
Build$: flag(tests) && flag(lwt)
144+
Build$: flag(tests) && flag(lwt_unix)
149145
Custom: true
150146
CompiledObject: best
151147
Install: false
@@ -154,7 +150,7 @@ Executable test_net_lwt_server
154150
Executable test_net_lwt_multi_get
155151
Path: lib_test
156152
MainIs: test_net_lwt_multi_get.ml
157-
Build$: flag(tests) && flag(lwt)
153+
Build$: flag(tests) && flag(lwt_unix)
158154
Custom: true
159155
CompiledObject: best
160156
Install: false
@@ -163,7 +159,7 @@ Executable test_net_lwt_multi_get
163159
Executable test_net_lwt_client_and_server
164160
Path: lib_test
165161
MainIs: test_net_lwt_client_and_server.ml
166-
Build$: flag(tests) && flag(lwt)
162+
Build$: flag(tests) && flag(lwt_unix)
167163
Custom: true
168164
CompiledObject: best
169165
Install: false
@@ -225,12 +221,12 @@ Test test_header
225221
WorkingDirectory: lib_test
226222

227223
Test test_parser
228-
Run$: flag(tests) && flag(lwt)
224+
Run$: flag(tests) && flag(lwt_unix)
229225
Command: $test_parser
230226
WorkingDirectory: lib_test
231227

232228
Test test_net_lwt
233-
Run$: flag(nettests) && flag(lwt)
229+
Run$: flag(nettests) && flag(lwt_unix)
234230
Command: $test_net_lwt
235231
WorkingDirectory: lib_test
236232

_tags

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: d6d7846f359008f884c46f27d8e4b33a)
2+
# DO NOT EDIT (digest: 1ff0e28ed44ab8fbe9000e26aee14bcb)
33
# Ignore VCS directories, you can use the same kind of rule outside
44
# OASIS_START/STOP if you want to exclude directories that contains
55
# useless stuff for the build process
@@ -37,6 +37,8 @@
3737
<cohttp/*.ml{,i}>: pkg_uri.services
3838
<cohttp/*.ml{,i}>: pkg_fieldslib
3939
<cohttp/*.ml{,i}>: pkg_fieldslib.syntax
40+
<cohttp/*.ml{,i}>: pkg_sexplib
41+
<cohttp/*.ml{,i}>: pkg_sexplib.syntax
4042
# Library cohttp_lwt
4143
"lwt/cohttp_lwt.cmxs": use_cohttp_lwt
4244
# Library cohttp_lwt_unix
@@ -53,6 +55,8 @@
5355
<lwt/*.ml{,i}>: pkg_uri.services
5456
<lwt/*.ml{,i}>: pkg_fieldslib
5557
<lwt/*.ml{,i}>: pkg_fieldslib.syntax
58+
<lwt/*.ml{,i}>: pkg_sexplib
59+
<lwt/*.ml{,i}>: pkg_sexplib.syntax
5660
# Library cohttp_async
5761
"async/cohttp_async.cmxs": use_cohttp_async
5862
<async/*.ml{,i}>: use_cohttp
@@ -63,6 +67,8 @@
6367
<async/*.ml{,i}>: pkg_uri.services
6468
<async/*.ml{,i}>: pkg_fieldslib
6569
<async/*.ml{,i}>: pkg_fieldslib.syntax
70+
<async/*.ml{,i}>: pkg_sexplib
71+
<async/*.ml{,i}>: pkg_sexplib.syntax
6672
# Executable test_parser
6773
<lib_test/test_parser.{native,byte}>: use_cohttp_lwt_unix
6874
<lib_test/test_parser.{native,byte}>: use_cohttp_lwt
@@ -78,6 +84,8 @@
7884
<lib_test/test_parser.{native,byte}>: pkg_uri.services
7985
<lib_test/test_parser.{native,byte}>: pkg_fieldslib
8086
<lib_test/test_parser.{native,byte}>: pkg_fieldslib.syntax
87+
<lib_test/test_parser.{native,byte}>: pkg_sexplib
88+
<lib_test/test_parser.{native,byte}>: pkg_sexplib.syntax
8189
<lib_test/test_parser.{native,byte}>: custom
8290
# Executable test_accept
8391
<lib_test/test_accept.{native,byte}>: use_cohttp
@@ -87,6 +95,8 @@
8795
<lib_test/test_accept.{native,byte}>: pkg_uri.services
8896
<lib_test/test_accept.{native,byte}>: pkg_fieldslib
8997
<lib_test/test_accept.{native,byte}>: pkg_fieldslib.syntax
98+
<lib_test/test_accept.{native,byte}>: pkg_sexplib
99+
<lib_test/test_accept.{native,byte}>: pkg_sexplib.syntax
90100
<lib_test/test_accept.{native,byte}>: custom
91101
# Executable test_header
92102
<lib_test/test_header.{native,byte}>: use_cohttp
@@ -96,6 +106,8 @@
96106
<lib_test/test_header.{native,byte}>: pkg_uri.services
97107
<lib_test/test_header.{native,byte}>: pkg_fieldslib
98108
<lib_test/test_header.{native,byte}>: pkg_fieldslib.syntax
109+
<lib_test/test_header.{native,byte}>: pkg_sexplib
110+
<lib_test/test_header.{native,byte}>: pkg_sexplib.syntax
99111
<lib_test/test_header.{native,byte}>: custom
100112
# Executable test_net_lwt
101113
<lib_test/test_net_lwt.{native,byte}>: use_cohttp_lwt_unix
@@ -112,6 +124,8 @@
112124
<lib_test/test_net_lwt.{native,byte}>: pkg_uri.services
113125
<lib_test/test_net_lwt.{native,byte}>: pkg_fieldslib
114126
<lib_test/test_net_lwt.{native,byte}>: pkg_fieldslib.syntax
127+
<lib_test/test_net_lwt.{native,byte}>: pkg_sexplib
128+
<lib_test/test_net_lwt.{native,byte}>: pkg_sexplib.syntax
115129
<lib_test/test_net_lwt.{native,byte}>: custom
116130
# Executable test_net_lwt_google
117131
<lib_test/test_net_lwt_google.{native,byte}>: use_cohttp_lwt_unix
@@ -127,6 +141,8 @@
127141
<lib_test/test_net_lwt_google.{native,byte}>: pkg_uri.services
128142
<lib_test/test_net_lwt_google.{native,byte}>: pkg_fieldslib
129143
<lib_test/test_net_lwt_google.{native,byte}>: pkg_fieldslib.syntax
144+
<lib_test/test_net_lwt_google.{native,byte}>: pkg_sexplib
145+
<lib_test/test_net_lwt_google.{native,byte}>: pkg_sexplib.syntax
130146
<lib_test/test_net_lwt_google.{native,byte}>: custom
131147
# Executable test_net_lwt_lastminute
132148
<lib_test/test_net_lwt_lastminute.{native,byte}>: use_cohttp_lwt_unix
@@ -142,6 +158,8 @@
142158
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_uri.services
143159
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_fieldslib
144160
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_fieldslib.syntax
161+
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_sexplib
162+
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_sexplib.syntax
145163
<lib_test/test_net_lwt_lastminute.{native,byte}>: custom
146164
# Executable test_net_lwt_server
147165
<lib_test/test_net_lwt_server.{native,byte}>: use_cohttp_lwt_unix
@@ -157,6 +175,8 @@
157175
<lib_test/test_net_lwt_server.{native,byte}>: pkg_uri.services
158176
<lib_test/test_net_lwt_server.{native,byte}>: pkg_fieldslib
159177
<lib_test/test_net_lwt_server.{native,byte}>: pkg_fieldslib.syntax
178+
<lib_test/test_net_lwt_server.{native,byte}>: pkg_sexplib
179+
<lib_test/test_net_lwt_server.{native,byte}>: pkg_sexplib.syntax
160180
<lib_test/test_net_lwt_server.{native,byte}>: custom
161181
# Executable test_net_lwt_multi_get
162182
<lib_test/test_net_lwt_multi_get.{native,byte}>: use_cohttp_lwt_unix
@@ -172,6 +192,8 @@
172192
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_uri.services
173193
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_fieldslib
174194
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_fieldslib.syntax
195+
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_sexplib
196+
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_sexplib.syntax
175197
<lib_test/test_net_lwt_multi_get.{native,byte}>: custom
176198
# Executable test_net_lwt_client_and_server
177199
<lib_test/test_net_lwt_client_and_server.{native,byte}>: use_cohttp_lwt_unix
@@ -187,6 +209,8 @@
187209
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_uri.services
188210
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_fieldslib
189211
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_fieldslib.syntax
212+
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_sexplib
213+
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_sexplib.syntax
190214
<lib_test/*.ml{,i}>: use_cohttp_lwt_unix
191215
<lib_test/*.ml{,i}>: use_cohttp_lwt
192216
<lib_test/*.ml{,i}>: pkg_unix
@@ -206,6 +230,8 @@
206230
<lib_test/test_net_async.{native,byte}>: pkg_uri.services
207231
<lib_test/test_net_async.{native,byte}>: pkg_fieldslib
208232
<lib_test/test_net_async.{native,byte}>: pkg_fieldslib.syntax
233+
<lib_test/test_net_async.{native,byte}>: pkg_sexplib
234+
<lib_test/test_net_async.{native,byte}>: pkg_sexplib.syntax
209235
<lib_test/test_net_async.{native,byte}>: custom
210236
# Executable test_net_async_http10
211237
<lib_test/test_net_async_http10.{native,byte}>: use_cohttp_async
@@ -218,6 +244,8 @@
218244
<lib_test/test_net_async_http10.{native,byte}>: pkg_uri.services
219245
<lib_test/test_net_async_http10.{native,byte}>: pkg_fieldslib
220246
<lib_test/test_net_async_http10.{native,byte}>: pkg_fieldslib.syntax
247+
<lib_test/test_net_async_http10.{native,byte}>: pkg_sexplib
248+
<lib_test/test_net_async_http10.{native,byte}>: pkg_sexplib.syntax
221249
<lib_test/test_net_async_http10.{native,byte}>: custom
222250
# Executable test_net_async_multi_get
223251
<lib_test/test_net_async_multi_get.{native,byte}>: use_cohttp_async
@@ -230,6 +258,8 @@
230258
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_uri.services
231259
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_fieldslib
232260
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_fieldslib.syntax
261+
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_sexplib
262+
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_sexplib.syntax
233263
<lib_test/test_net_async_multi_get.{native,byte}>: custom
234264
# Executable test_net_async_server
235265
<lib_test/test_net_async_server.{native,byte}>: use_cohttp_async
@@ -242,6 +272,8 @@
242272
<lib_test/test_net_async_server.{native,byte}>: pkg_uri.services
243273
<lib_test/test_net_async_server.{native,byte}>: pkg_fieldslib
244274
<lib_test/test_net_async_server.{native,byte}>: pkg_fieldslib.syntax
275+
<lib_test/test_net_async_server.{native,byte}>: pkg_sexplib
276+
<lib_test/test_net_async_server.{native,byte}>: pkg_sexplib.syntax
245277
<lib_test/*.ml{,i}>: use_cohttp_async
246278
<lib_test/*.ml{,i}>: use_cohttp
247279
<lib_test/*.ml{,i}>: pkg_oUnit
@@ -252,6 +284,8 @@
252284
<lib_test/*.ml{,i}>: pkg_uri.services
253285
<lib_test/*.ml{,i}>: pkg_fieldslib
254286
<lib_test/*.ml{,i}>: pkg_fieldslib.syntax
287+
<lib_test/*.ml{,i}>: pkg_sexplib
288+
<lib_test/*.ml{,i}>: pkg_sexplib.syntax
255289
<lib_test/test_net_async_server.{native,byte}>: custom
256290
# Executable cohttp-server
257291
<bin/cohttp_server_async.{native,byte}>: use_cohttp_async
@@ -263,6 +297,8 @@
263297
<bin/cohttp_server_async.{native,byte}>: pkg_uri.services
264298
<bin/cohttp_server_async.{native,byte}>: pkg_fieldslib
265299
<bin/cohttp_server_async.{native,byte}>: pkg_fieldslib.syntax
300+
<bin/cohttp_server_async.{native,byte}>: pkg_sexplib
301+
<bin/cohttp_server_async.{native,byte}>: pkg_sexplib.syntax
266302
<bin/*.ml{,i}>: use_cohttp_async
267303
<bin/*.ml{,i}>: use_cohttp
268304
<bin/*.ml{,i}>: pkg_uri
@@ -272,6 +308,8 @@
272308
<bin/*.ml{,i}>: pkg_uri.services
273309
<bin/*.ml{,i}>: pkg_fieldslib
274310
<bin/*.ml{,i}>: pkg_fieldslib.syntax
311+
<bin/*.ml{,i}>: pkg_sexplib
312+
<bin/*.ml{,i}>: pkg_sexplib.syntax
275313
<bin/cohttp_server_async.{native,byte}>: custom
276314
# OASIS_STOP
277315
true: annot, bin_annot, debug, strict_sequence, principal

0 commit comments

Comments
 (0)