Skip to content

Commit 56ed1c2

Browse files
committed
Merge pull request #4 from avsm/master
0.9.12
2 parents 1f83f35 + 1f88678 commit 56ed1c2

22 files changed

+250
-132
lines changed

.merlin

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
S async
2+
S cohttp
3+
S lib_test
4+
S lwt
5+
6+
PKG lwt
7+
PKG lwt.syntax
8+
PKG lwt.unix
9+
PKG core
10+
PKG async
11+
PKG uri
12+
PKG re.str
13+
14+
B _build/
15+
B _build/lwt
16+
B _build/lib_test
17+
B _build/async
18+
B _build/cohttp

CHANGES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
0.9.12 (2013-11-28):
2+
* Improve documentation for `Cohttp.Header`.
3+
* Expose Fieldslib setters and getters for most of the `Cohttp` types (#38).
4+
* `Cohttp.Set_cookie.t` is no longer an abstract type to make it easier to update (#38).
5+
* [Lwt] ignore SIGPIPE unconditionally if using the Lwt/Unix module (#37).
6+
* Rename `Cookie` creation parameters for consistency (interface breaking, see #44).
7+
* Fix transfer-length detection (regression from 0.9.11 in #42).
8+
* Add Merin editor file (#41).
9+
110
0.9.11 (2013-10-27):
211
* Request module: When sending a request, add the port information in the host header field if available.
312
* Request module: When parsing a request, add scheme, host and port information in the uri.

_oasis

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OASISFormat: 0.3
22
Name: cohttp
3-
Version: 0.9.11
3+
Version: 0.9.12
44
Synopsis: HTTP library for Lwt, Async and Mirage
55
Authors: Anil Madhavapeddy, Stefano Zacchiroli, David Sheets, Thomas Gazagnaire, David Scott
66
License: LGPL-2.0 with OCaml linking exception
@@ -12,7 +12,7 @@ Library cohttp
1212
Findlibname: cohttp
1313
Pack: true
1414
Modules: IO, Code, Header, Cookie, Request, Response, Transfer, Accept, Accept_parser, Accept_lexer, Base64, Auth, Header_io, Transfer_io, Client
15-
BuildDepends: re, uri (>= 1.3.8), uri.services
15+
BuildDepends: re, uri (>= 1.3.8), uri.services, fieldslib, fieldslib.syntax
1616

1717
Flag lwt
1818
Description: build the Lwt library

_tags

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: a952834f500b83eea06ca53d69394888)
2+
# DO NOT EDIT (digest: 089787a6c5457a0274e3a8e4ceb59b20)
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
@@ -33,6 +33,8 @@
3333
<cohttp/*.ml{,i}>: pkg_uri
3434
<cohttp/*.ml{,i}>: pkg_re
3535
<cohttp/*.ml{,i}>: pkg_uri.services
36+
<cohttp/*.ml{,i}>: pkg_fieldslib
37+
<cohttp/*.ml{,i}>: pkg_fieldslib.syntax
3638
# Library cohttp_lwt_unix
3739
"lwt/cohttp_lwt_unix.cmxs": use_cohttp_lwt_unix
3840
<lwt/*.ml{,i}>: pkg_lwt.unix
@@ -48,6 +50,8 @@
4850
<lwt/*.ml{,i}>: pkg_mirage-net
4951
<lwt/*.ml{,i}>: pkg_cstruct
5052
<lwt/*.ml{,i}>: pkg_uri.services
53+
<lwt/*.ml{,i}>: pkg_fieldslib
54+
<lwt/*.ml{,i}>: pkg_fieldslib.syntax
5155
# Library cohttp_async
5256
"async/cohttp_async.cmxs": use_cohttp_async
5357
<async/*.ml{,i}>: use_cohttp
@@ -58,6 +62,8 @@
5862
<async/*.ml{,i}>: pkg_async
5963
<async/*.ml{,i}>: pkg_re
6064
<async/*.ml{,i}>: pkg_uri.services
65+
<async/*.ml{,i}>: pkg_fieldslib
66+
<async/*.ml{,i}>: pkg_fieldslib.syntax
6167
# Executable test_parser
6268
<lib_test/test_parser.{native,byte}>: use_cohttp_lwt_unix
6369
<lib_test/test_parser.{native,byte}>: use_cohttp
@@ -69,20 +75,26 @@
6975
<lib_test/test_parser.{native,byte}>: pkg_lwt
7076
<lib_test/test_parser.{native,byte}>: pkg_lwt.ssl
7177
<lib_test/test_parser.{native,byte}>: pkg_uri.services
78+
<lib_test/test_parser.{native,byte}>: pkg_fieldslib
79+
<lib_test/test_parser.{native,byte}>: pkg_fieldslib.syntax
7280
<lib_test/test_parser.{native,byte}>: custom
7381
# Executable test_accept
7482
<lib_test/test_accept.{native,byte}>: use_cohttp
7583
<lib_test/test_accept.{native,byte}>: pkg_oUnit
7684
<lib_test/test_accept.{native,byte}>: pkg_uri
7785
<lib_test/test_accept.{native,byte}>: pkg_re
7886
<lib_test/test_accept.{native,byte}>: pkg_uri.services
87+
<lib_test/test_accept.{native,byte}>: pkg_fieldslib
88+
<lib_test/test_accept.{native,byte}>: pkg_fieldslib.syntax
7989
<lib_test/test_accept.{native,byte}>: custom
8090
# Executable test_header
8191
<lib_test/test_header.{native,byte}>: use_cohttp
8292
<lib_test/test_header.{native,byte}>: pkg_oUnit
8393
<lib_test/test_header.{native,byte}>: pkg_uri
8494
<lib_test/test_header.{native,byte}>: pkg_re
8595
<lib_test/test_header.{native,byte}>: pkg_uri.services
96+
<lib_test/test_header.{native,byte}>: pkg_fieldslib
97+
<lib_test/test_header.{native,byte}>: pkg_fieldslib.syntax
8698
<lib_test/test_header.{native,byte}>: custom
8799
# Executable test_net_lwt
88100
<lib_test/test_net_lwt.{native,byte}>: use_cohttp_lwt_unix
@@ -95,6 +107,8 @@
95107
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt
96108
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt.ssl
97109
<lib_test/test_net_lwt.{native,byte}>: pkg_uri.services
110+
<lib_test/test_net_lwt.{native,byte}>: pkg_fieldslib
111+
<lib_test/test_net_lwt.{native,byte}>: pkg_fieldslib.syntax
98112
<lib_test/test_net_lwt.{native,byte}>: custom
99113
# Executable test_net_lwt_google
100114
<lib_test/test_net_lwt_google.{native,byte}>: use_cohttp_lwt_unix
@@ -106,6 +120,8 @@
106120
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt
107121
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt.ssl
108122
<lib_test/test_net_lwt_google.{native,byte}>: pkg_uri.services
123+
<lib_test/test_net_lwt_google.{native,byte}>: pkg_fieldslib
124+
<lib_test/test_net_lwt_google.{native,byte}>: pkg_fieldslib.syntax
109125
<lib_test/test_net_lwt_google.{native,byte}>: custom
110126
# Executable test_net_lwt_lastminute
111127
<lib_test/test_net_lwt_lastminute.{native,byte}>: use_cohttp_lwt_unix
@@ -117,6 +133,8 @@
117133
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt
118134
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt.ssl
119135
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_uri.services
136+
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_fieldslib
137+
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_fieldslib.syntax
120138
<lib_test/test_net_lwt_lastminute.{native,byte}>: custom
121139
# Executable test_net_lwt_server
122140
<lib_test/test_net_lwt_server.{native,byte}>: use_cohttp_lwt_unix
@@ -128,6 +146,8 @@
128146
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt
129147
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt.ssl
130148
<lib_test/test_net_lwt_server.{native,byte}>: pkg_uri.services
149+
<lib_test/test_net_lwt_server.{native,byte}>: pkg_fieldslib
150+
<lib_test/test_net_lwt_server.{native,byte}>: pkg_fieldslib.syntax
131151
<lib_test/test_net_lwt_server.{native,byte}>: custom
132152
# Executable test_net_lwt_multi_get
133153
<lib_test/test_net_lwt_multi_get.{native,byte}>: use_cohttp_lwt_unix
@@ -139,6 +159,8 @@
139159
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt
140160
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt.ssl
141161
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_uri.services
162+
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_fieldslib
163+
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_fieldslib.syntax
142164
<lib_test/test_net_lwt_multi_get.{native,byte}>: custom
143165
# Executable test_net_lwt_client_and_server
144166
<lib_test/test_net_lwt_client_and_server.{native,byte}>: use_cohttp_lwt_unix
@@ -150,6 +172,8 @@
150172
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt
151173
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt.ssl
152174
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_uri.services
175+
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_fieldslib
176+
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_fieldslib.syntax
153177
<lib_test/*.ml{,i}>: use_cohttp_lwt_unix
154178
<lib_test/*.ml{,i}>: pkg_lwt.syntax
155179
<lib_test/*.ml{,i}>: pkg_lwt.unix
@@ -167,6 +191,8 @@
167191
<lib_test/test_net_async.{native,byte}>: pkg_async
168192
<lib_test/test_net_async.{native,byte}>: pkg_re
169193
<lib_test/test_net_async.{native,byte}>: pkg_uri.services
194+
<lib_test/test_net_async.{native,byte}>: pkg_fieldslib
195+
<lib_test/test_net_async.{native,byte}>: pkg_fieldslib.syntax
170196
<lib_test/test_net_async.{native,byte}>: custom
171197
# Executable test_net_async_http10
172198
<lib_test/test_net_async_http10.{native,byte}>: use_cohttp_async
@@ -179,6 +205,8 @@
179205
<lib_test/test_net_async_http10.{native,byte}>: pkg_async
180206
<lib_test/test_net_async_http10.{native,byte}>: pkg_re
181207
<lib_test/test_net_async_http10.{native,byte}>: pkg_uri.services
208+
<lib_test/test_net_async_http10.{native,byte}>: pkg_fieldslib
209+
<lib_test/test_net_async_http10.{native,byte}>: pkg_fieldslib.syntax
182210
<lib_test/test_net_async_http10.{native,byte}>: custom
183211
# Executable test_net_async_multi_get
184212
<lib_test/test_net_async_multi_get.{native,byte}>: use_cohttp_async
@@ -191,6 +219,8 @@
191219
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_async
192220
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_re
193221
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_uri.services
222+
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_fieldslib
223+
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_fieldslib.syntax
194224
<lib_test/test_net_async_multi_get.{native,byte}>: custom
195225
# Executable test_net_async_server
196226
<lib_test/test_net_async_server.{native,byte}>: use_cohttp_async
@@ -203,6 +233,8 @@
203233
<lib_test/test_net_async_server.{native,byte}>: pkg_async
204234
<lib_test/test_net_async_server.{native,byte}>: pkg_re
205235
<lib_test/test_net_async_server.{native,byte}>: pkg_uri.services
236+
<lib_test/test_net_async_server.{native,byte}>: pkg_fieldslib
237+
<lib_test/test_net_async_server.{native,byte}>: pkg_fieldslib.syntax
206238
<lib_test/*.ml{,i}>: use_cohttp_async
207239
<lib_test/*.ml{,i}>: use_cohttp
208240
<lib_test/*.ml{,i}>: pkg_oUnit
@@ -213,8 +245,11 @@
213245
<lib_test/*.ml{,i}>: pkg_async
214246
<lib_test/*.ml{,i}>: pkg_re
215247
<lib_test/*.ml{,i}>: pkg_uri.services
248+
<lib_test/*.ml{,i}>: pkg_fieldslib
249+
<lib_test/*.ml{,i}>: pkg_fieldslib.syntax
216250
<lib_test/test_net_async_server.{native,byte}>: custom
217251
# OASIS_STOP
218252
<lib_test/{test_parser,test_net_lwt,test_net_lwt_server,test_net_mirage_server,test_net_lwt_client_and_server}.ml>: syntax_camlp4o, pkg_lwt.syntax
253+
<cohttp/request.*> or <cohttp/response.*> or <cohttp/cookie.*>: syntax_camlp4o, pkg_fieldslib.syntax
219254
<lwt/*>: syntax_camlp4o, pkg_lwt.syntax
220255
true: annot, bin_annot, debug, strict_sequence, principal

cohttp/META

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: 42c241565f568101016fcd5589037ab2)
3-
version = "0.9.11"
2+
# DO NOT EDIT (digest: 6986af1ee7d3541b9e1fb0656ec3ac2c)
3+
version = "0.9.12"
44
description = "HTTP library for Lwt, Async and Mirage"
5-
requires = "re uri uri.services"
5+
requires = "re uri uri.services fieldslib fieldslib.syntax"
66
archive(byte) = "cohttp.cma"
77
archive(byte, plugin) = "cohttp.cma"
88
archive(native) = "cohttp.cmxa"
99
archive(native, plugin) = "cohttp.cmxs"
1010
exists_if = "cohttp.cma"
1111
package "mirage" (
12-
version = "0.9.11"
12+
version = "0.9.12"
1313
description = "HTTP library for Lwt, Async and Mirage"
1414
requires = "uri re cohttp lwt.syntax mirage mirage-net cstruct"
1515
archive(byte) = "cohttp_mirage.cma"
@@ -20,7 +20,7 @@ package "mirage" (
2020
)
2121

2222
package "lwt" (
23-
version = "0.9.11"
23+
version = "0.9.12"
2424
description = "HTTP library for Lwt, Async and Mirage"
2525
requires = "lwt.unix lwt uri cohttp lwt.ssl lwt.syntax"
2626
archive(byte) = "cohttp_lwt_unix.cma"
@@ -31,7 +31,7 @@ package "lwt" (
3131
)
3232

3333
package "async" (
34-
version = "0.9.11"
34+
version = "0.9.12"
3535
description = "HTTP library for Lwt, Async and Mirage"
3636
requires = "uri cohttp async_core async_unix threads async"
3737
archive(byte) = "cohttp_async.cma"

cohttp/accept.mli

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
(*
2+
Copyright (C) 2012, David Sheets <[email protected]>
3+
4+
Permission to use, copy, modify, and/or distribute this software for
5+
any purpose with or without fee is hereby granted, provided that the
6+
above copyright notice and this permission notice appear in all
7+
copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10+
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11+
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12+
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13+
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
14+
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16+
PERFORMANCE OF THIS SOFTWARE.
17+
*)
18+
119
type pv = Accept_types.pv = T of string | S of string
220
type p = string * pv
321
type media_range =

cohttp/base64.ml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
(*
2-
* Copyright (C) 2006-2009 Citrix Systems Inc.
3-
* 2010 Thomas Gazagnaire <[email protected]>
2+
* Copyright (c) 2006-2009 Citrix Systems Inc.
3+
* Copyright (c) 2010 Thomas Gazagnaire <[email protected]>
44
*
5-
* This program is free software; you can redistribute it and/or modify
6-
* it under the terms of the GNU Lesser General Public License as published
7-
* by the Free Software Foundation; version 2.1 only. with the special
8-
* exception on linking described in file LICENSE.
5+
* Permission to use, copy, modify, and distribute this software for any
6+
* purpose with or without fee is hereby granted, provided that the above
7+
* copyright notice and this permission notice appear in all copies.
8+
*
9+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
916
*
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU Lesser General Public License for more details.
1417
*)
1518

1619
let code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

cohttp/base64.mli

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
(*
2-
* Copyright (C) 2006-2009 Citrix Systems Inc.
2+
* Copyright (c) 2006-2009 Citrix Systems Inc.
3+
* Copyright (c) 2010 Thomas Gazagnaire <[email protected]>
34
*
4-
* This program is free software; you can redistribute it and/or modify
5-
* it under the terms of the GNU Lesser General Public License as published
6-
* by the Free Software Foundation; version 2.1 only. with the special
7-
* exception on linking described in file LICENSE.
5+
* Permission to use, copy, modify, and distribute this software for any
6+
* purpose with or without fee is hereby granted, provided that the above
7+
* copyright notice and this permission notice appear in all copies.
8+
*
9+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
816
*
9-
* This program is distributed in the hope that it will be useful,
10-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
* GNU Lesser General Public License for more details.
1317
*)
1418

1519
(** decode a string encoded in base64. Will leave trailing NULLs on the string

0 commit comments

Comments
 (0)