Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d2a7835
.merlin
rgrinberg Nov 14, 2013
e9c824e
Fix transfer length detection (regression from 52cdf69c6de30b08e6a321…
avsm Nov 21, 2013
afd063a
regenerate OASIS
avsm Nov 21, 2013
1b3259c
Merge pull request #41 from rgrinberg/dot_merlin
avsm Nov 21, 2013
7bde43f
CHANGES entry for #41
avsm Nov 21, 2013
3b9c7da
renaming for consistency
rgrinberg Nov 23, 2013
2db7d62
Merge pull request #45 from rgrinberg/consistency_renaming
avsm Nov 27, 2013
1400c30
Add #44 renaming to CHANGES
avsm Nov 27, 2013
daefa6d
[Lwt] ignore SIGPIPE unconditionally if using the Lwt/Unix module
avsm Nov 27, 2013
b41a779
Relicense Base64 to ISC with agreement from @samoht and @djs55
avsm Nov 27, 2013
f3ad60b
Relicense cookie.ml{,i} to ISC
dsheets Nov 27, 2013
0fa886c
Merge pull request #47 from dsheets/master
avsm Nov 27, 2013
13b3c77
Print out live GC stats in Async test server, for helping to debug #31
avsm Nov 27, 2013
da10a6d
tidy up whitespace
avsm Nov 27, 2013
b9cf06f
`Cohttp.Set_cookie.t` is no longer an abstract type to make it easier…
avsm Nov 27, 2013
8f24e8e
Add missing license; #33
avsm Nov 28, 2013
abf8e70
depend on fieldslib and the syntax extension
avsm Nov 28, 2013
a503fa7
Expose the underlying record type and add fieldslib getters/setters
avsm Nov 28, 2013
e2b4dc5
Add test cases for mutation of request/responses
avsm Nov 28, 2013
1feb4c0
use fieldslib for Cookie as well
avsm Nov 28, 2013
ddca616
Add some more documentation for Cohttp.Header
avsm Nov 28, 2013
59ea6d1
Merge branch 'use-fieldslib'
avsm Nov 28, 2013
c07047b
sync CHANGES
avsm Nov 28, 2013
1f88678
release 0.9.12
avsm Nov 28, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .merlin
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
S async
S cohttp
S lib_test
S lwt

PKG lwt
PKG lwt.syntax
PKG lwt.unix
PKG core
PKG async
PKG uri
PKG re.str

B _build/
B _build/lwt
B _build/lib_test
B _build/async
B _build/cohttp
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
0.9.12 (2013-11-28):
* Improve documentation for `Cohttp.Header`.
* Expose Fieldslib setters and getters for most of the `Cohttp` types (#38).
* `Cohttp.Set_cookie.t` is no longer an abstract type to make it easier to update (#38).
* [Lwt] ignore SIGPIPE unconditionally if using the Lwt/Unix module (#37).
* Rename `Cookie` creation parameters for consistency (interface breaking, see #44).
* Fix transfer-length detection (regression from 0.9.11 in #42).
* Add Merin editor file (#41).

0.9.11 (2013-10-27):
* Request module: When sending a request, add the port information in the host header field if available.
* Request module: When parsing a request, add scheme, host and port information in the uri.
Expand Down
4 changes: 2 additions & 2 deletions _oasis
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OASISFormat: 0.3
Name: cohttp
Version: 0.9.11
Version: 0.9.12
Synopsis: HTTP library for Lwt, Async and Mirage
Authors: Anil Madhavapeddy, Stefano Zacchiroli, David Sheets, Thomas Gazagnaire, David Scott
License: LGPL-2.0 with OCaml linking exception
Expand All @@ -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
BuildDepends: re, uri (>= 1.3.8), uri.services
BuildDepends: re, uri (>= 1.3.8), uri.services, fieldslib, fieldslib.syntax

Flag lwt
Description: build the Lwt library
Expand Down
37 changes: 36 additions & 1 deletion _tags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: a952834f500b83eea06ca53d69394888)
# DO NOT EDIT (digest: 089787a6c5457a0274e3a8e4ceb59b20)
# 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 @@ -33,6 +33,8 @@
<cohttp/*.ml{,i}>: pkg_uri
<cohttp/*.ml{,i}>: pkg_re
<cohttp/*.ml{,i}>: pkg_uri.services
<cohttp/*.ml{,i}>: pkg_fieldslib
<cohttp/*.ml{,i}>: pkg_fieldslib.syntax
# Library cohttp_lwt_unix
"lwt/cohttp_lwt_unix.cmxs": use_cohttp_lwt_unix
<lwt/*.ml{,i}>: pkg_lwt.unix
Expand All @@ -48,6 +50,8 @@
<lwt/*.ml{,i}>: pkg_mirage-net
<lwt/*.ml{,i}>: pkg_cstruct
<lwt/*.ml{,i}>: pkg_uri.services
<lwt/*.ml{,i}>: pkg_fieldslib
<lwt/*.ml{,i}>: pkg_fieldslib.syntax
# Library cohttp_async
"async/cohttp_async.cmxs": use_cohttp_async
<async/*.ml{,i}>: use_cohttp
Expand All @@ -58,6 +62,8 @@
<async/*.ml{,i}>: pkg_async
<async/*.ml{,i}>: pkg_re
<async/*.ml{,i}>: pkg_uri.services
<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
Expand All @@ -69,20 +75,26 @@
<lib_test/test_parser.{native,byte}>: pkg_lwt
<lib_test/test_parser.{native,byte}>: pkg_lwt.ssl
<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}>: custom
# Executable test_accept
<lib_test/test_accept.{native,byte}>: use_cohttp
<lib_test/test_accept.{native,byte}>: pkg_oUnit
<lib_test/test_accept.{native,byte}>: pkg_uri
<lib_test/test_accept.{native,byte}>: pkg_re
<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}>: custom
# Executable test_header
<lib_test/test_header.{native,byte}>: use_cohttp
<lib_test/test_header.{native,byte}>: pkg_oUnit
<lib_test/test_header.{native,byte}>: pkg_uri
<lib_test/test_header.{native,byte}>: pkg_re
<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}>: custom
# Executable test_net_lwt
<lib_test/test_net_lwt.{native,byte}>: use_cohttp_lwt_unix
Expand All @@ -95,6 +107,8 @@
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt.{native,byte}>: pkg_lwt.ssl
<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
Expand All @@ -106,6 +120,8 @@
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_google.{native,byte}>: pkg_lwt.ssl
<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
Expand All @@ -117,6 +133,8 @@
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_lastminute.{native,byte}>: pkg_lwt.ssl
<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
Expand All @@ -128,6 +146,8 @@
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_server.{native,byte}>: pkg_lwt.ssl
<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
Expand All @@ -139,6 +159,8 @@
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_multi_get.{native,byte}>: pkg_lwt.ssl
<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
Expand All @@ -150,6 +172,8 @@
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt
<lib_test/test_net_lwt_client_and_server.{native,byte}>: pkg_lwt.ssl
<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}>: pkg_lwt.syntax
<lib_test/*.ml{,i}>: pkg_lwt.unix
Expand All @@ -167,6 +191,8 @@
<lib_test/test_net_async.{native,byte}>: pkg_async
<lib_test/test_net_async.{native,byte}>: pkg_re
<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}>: custom
# Executable test_net_async_http10
<lib_test/test_net_async_http10.{native,byte}>: use_cohttp_async
Expand All @@ -179,6 +205,8 @@
<lib_test/test_net_async_http10.{native,byte}>: pkg_async
<lib_test/test_net_async_http10.{native,byte}>: pkg_re
<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}>: custom
# Executable test_net_async_multi_get
<lib_test/test_net_async_multi_get.{native,byte}>: use_cohttp_async
Expand All @@ -191,6 +219,8 @@
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_async
<lib_test/test_net_async_multi_get.{native,byte}>: pkg_re
<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}>: custom
# Executable test_net_async_server
<lib_test/test_net_async_server.{native,byte}>: use_cohttp_async
Expand All @@ -203,6 +233,8 @@
<lib_test/test_net_async_server.{native,byte}>: pkg_async
<lib_test/test_net_async_server.{native,byte}>: pkg_re
<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/*.ml{,i}>: use_cohttp_async
<lib_test/*.ml{,i}>: use_cohttp
<lib_test/*.ml{,i}>: pkg_oUnit
Expand All @@ -213,8 +245,11 @@
<lib_test/*.ml{,i}>: pkg_async
<lib_test/*.ml{,i}>: pkg_re
<lib_test/*.ml{,i}>: pkg_uri.services
<lib_test/*.ml{,i}>: pkg_fieldslib
<lib_test/*.ml{,i}>: pkg_fieldslib.syntax
<lib_test/test_net_async_server.{native,byte}>: custom
# OASIS_STOP
<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
<cohttp/request.*> or <cohttp/response.*> or <cohttp/cookie.*>: syntax_camlp4o, pkg_fieldslib.syntax
<lwt/*>: syntax_camlp4o, pkg_lwt.syntax
true: annot, bin_annot, debug, strict_sequence, principal
12 changes: 6 additions & 6 deletions cohttp/META
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# OASIS_START
# DO NOT EDIT (digest: 42c241565f568101016fcd5589037ab2)
version = "0.9.11"
# DO NOT EDIT (digest: 6986af1ee7d3541b9e1fb0656ec3ac2c)
version = "0.9.12"
description = "HTTP library for Lwt, Async and Mirage"
requires = "re uri uri.services"
requires = "re uri uri.services fieldslib fieldslib.syntax"
archive(byte) = "cohttp.cma"
archive(byte, plugin) = "cohttp.cma"
archive(native) = "cohttp.cmxa"
archive(native, plugin) = "cohttp.cmxs"
exists_if = "cohttp.cma"
package "mirage" (
version = "0.9.11"
version = "0.9.12"
description = "HTTP library for Lwt, Async and Mirage"
requires = "uri re cohttp lwt.syntax mirage mirage-net cstruct"
archive(byte) = "cohttp_mirage.cma"
Expand All @@ -20,7 +20,7 @@ package "mirage" (
)

package "lwt" (
version = "0.9.11"
version = "0.9.12"
description = "HTTP library for Lwt, Async and Mirage"
requires = "lwt.unix lwt uri cohttp lwt.ssl lwt.syntax"
archive(byte) = "cohttp_lwt_unix.cma"
Expand All @@ -31,7 +31,7 @@ package "lwt" (
)

package "async" (
version = "0.9.11"
version = "0.9.12"
description = "HTTP library for Lwt, Async and Mirage"
requires = "uri cohttp async_core async_unix threads async"
archive(byte) = "cohttp_async.cma"
Expand Down
18 changes: 18 additions & 0 deletions cohttp/accept.mli
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
(*
Copyright (C) 2012, David Sheets <sheets@alum.mit.edu>

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*)

type pv = Accept_types.pv = T of string | S of string
type p = string * pv
type media_range =
Expand Down
23 changes: 13 additions & 10 deletions cohttp/base64.ml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
(*
* Copyright (C) 2006-2009 Citrix Systems Inc.
* 2010 Thomas Gazagnaire <thomas@gazagnaire.com>
* Copyright (c) 2006-2009 Citrix Systems Inc.
* Copyright (c) 2010 Thomas Gazagnaire <thomas@gazagnaire.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)

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

(** decode a string encoded in base64. Will leave trailing NULLs on the string
Expand Down
Loading