Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impose a limit of 4k on HTTP headers and request lines #379

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions repo/darwin/packages/dev/cohttp-mirage.1.2.0/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
An OCaml library for HTTP clients and servers

[![Join the chat at https://gitter.im/mirage/ocaml-cohttp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mirage/ocaml-cohttp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Cohttp is an OCaml library for creating HTTP daemons. It has a portable
HTTP parser, and implementations using various asynchronous programming
libraries:

* `Cohttp_lwt_unix` uses the [Lwt](https://ocsigen.org/lwt/) library, and
specifically the UNIX bindings.
* `Cohttp_async` uses the [Async](https://realworldocaml.org/v1/en/html/concurrent-programming-with-async.html)
library.
* `Cohttp_lwt` exposes an OS-independent Lwt interface, which is used
by the [Mirage](https://mirage.io/) interface to generate standalone
microkernels (use the cohttp-mirage subpackage).
* `Cohttp_lwt_xhr` compiles to a JavaScript module that maps the Cohttp
calls to XMLHTTPRequests. This is used to compile OCaml libraries like
the GitHub bindings to JavaScript and still run efficiently.

You can implement other targets using the parser very easily. Look at the `IO`
signature in `lib/s.mli` and implement that in the desired backend.

You can activate some runtime debugging by setting `COHTTP_DEBUG` to any
value, and all requests and responses will be written to stderr. Further
debugging of the connection layer can be obtained by setting `CONDUIT_DEBUG`
to any value.
30 changes: 30 additions & 0 deletions repo/darwin/packages/dev/cohttp-mirage.1.2.0/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
opam-version: "1.2"
maintainer: "anil@recoil.org"
authors: [
"Anil Madhavapeddy"
"Thomas Gazagnaire"
]
homepage: "https://github.com/mirage/ocaml-cohttp"
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
license: "ISC"
tags: ["org:mirage" "org:xapi-project"]
dev-repo: "https://github.com/mirage/ocaml-cohttp.git"
build: [
["jbuilder" "subst" "-n" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
]
build-test: [["jbuilder" "runtest" "-p" name "-j" jobs]]
depends: [
"jbuilder" {build & >= "1.0+beta10"}
"result"
"mirage-flow-lwt" {>= "1.2.0"}
"mirage-channel-lwt" {>= "3.0.0"}
"conduit" {>= "0.99"}
"mirage-conduit" {>= "3.0.0"}
"lwt" {>= "2.4.3"}
"cohttp"
"cohttp-lwt"
"astring"
"magic-mime"
]
available: [ocaml-version >= "4.03.0"]
1 change: 1 addition & 0 deletions repo/darwin/packages/dev/cohttp-mirage.1.2.0/url
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git: "https://github.com/djs55/ocaml-cohttp#read-line-limit"
1 change: 1 addition & 0 deletions repo/darwin/packages/dev/mirage-channel-lwt.3.2.0/url
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git: "https://github.com/djs55/mirage-channel#read-line-limit"
1 change: 1 addition & 0 deletions repo/darwin/packages/dev/mirage-channel.3.2.0/url
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git: "https://github.com/djs55/mirage-channel#read-line-limit"
10 changes: 10 additions & 0 deletions repo/darwin/packages/upstream/asn1-combinators.0.2.0/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Embed typed ASN.1 grammars in OCaml

asn1-combinators is a library for expressing ASN.1 in OCaml. Skip the notation
part of ASN.1, and embed the abstract syntax directly in the language. These
abstract syntax representations can be used for parsing, serialization, or
random testing.

The only ASN.1 encodings currently supported are BER and DER.

asn1-combinators is distributed under the ISC license.
27 changes: 27 additions & 0 deletions repo/darwin/packages/upstream/asn1-combinators.0.2.0/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
opam-version: "1.2"
authors: ["David Kaloper Meršinjak <david@numm.org>"]
maintainer: "David Kaloper Meršinjak <david@numm.org>"
homepage: "https://github.com/mirleft/ocaml-asn1-combinators"
doc: "https://mirleft.github.io/ocaml-asn1-combinators/doc"
license: "ISC"
dev-repo: "https://github.com/mirleft/ocaml-asn1-combinators.git"
bug-reports: "https://github.com/mirleft/ocaml-asn1-combinators/issues"
tags: [ "org:mirage" ]
available: [ ocaml-version >= "4.02.0" ]
build: [ "ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "false" ]
build-test: [
[ "ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "true" ]
[ "ocaml" "pkg/pkg.ml" "test" ]
]
depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"topkg" {build}
"result"
"cstruct"
"zarith"
"ptime"
"ounit" {test}
]
depopts: []
conflicts: [ "cstruct" {< "1.6.0"} ]
2 changes: 2 additions & 0 deletions repo/darwin/packages/upstream/asn1-combinators.0.2.0/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/mirleft/ocaml-asn1-combinators/releases/download/v0.2.0/asn1-combinators-0.2.0.tbz"
checksum: "f695aec35f8934d20d966032adbf3520"
2 changes: 1 addition & 1 deletion repo/darwin/packages/upstream/base.v0.10.0/opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ depends: [
depopts: [
"base-native-int63"
]
available: [ ocaml-version >= "4.04.1" ]
available: [ ocaml-version >= "4.04.1" & ocaml-version < "4.07.0" ]
37 changes: 37 additions & 0 deletions repo/darwin/packages/upstream/conduit-lwt.1.1.0/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
An OCaml network connection establishment library

[![Build Status](https://travis-ci.org/mirage/ocaml-conduit.svg?branch=master)](https://travis-ci.org/mirage/ocaml-conduit)

The `conduit` library takes care of establishing and listening for
TCP and SSL/TLS connections for the Lwt and Async libraries.

The reason this library exists is to provide a degree of abstraction
from the precise SSL library used, since there are a variety of ways
to bind to a library (e.g. the C FFI, or the Ctypes library), as well
as well as which library is used (just OpenSSL for now).

By default, OpenSSL is used as the preferred connection library, but
you can force the use of the pure OCaml TLS stack by setting the
environment variable `CONDUIT_TLS=native` when starting your program.

The opam packages available are:

- `conduit`: the main `Conduit` module
- `conduit-lwt`: the portable Lwt implementation
- `conduit-lwt-unix`: the Lwt/Unix implementation
- `conduit-async` the Jane Street Async implementation
- `mirage-conduit`: the MirageOS compatible implementation

### Debugging

Some of the `Lwt_unix`-based modules use a non-empty `CONDUIT_DEBUG`
environment variable to output debugging information to standard error.
Just set this variable when running the program to see what URIs
are being resolved to.

### Further Informartion

* **API Docs:** http://docs.mirage.io/
* **WWW:** https://github.com/mirage/ocaml-conduit
* **E-mail:** <mirageos-devel@lists.xenproject.org>
* **Bugs:** https://github.com/mirage/ocaml-conduit/issues
21 changes: 21 additions & 0 deletions repo/darwin/packages/upstream/conduit-lwt.1.1.0/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
opam-version: "1.2"
maintainer: "anil@recoil.org"
authors: ["Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg"]
homepage: "https://github.com/mirage/ocaml-conduit"
dev-repo: "https://github.com/mirage/ocaml-conduit.git"
bug-reports: "https://github.com/mirage/ocaml-conduit/issues"
tags: "org:mirage"
license: "ISC"

build: [
["jbuilder" "subst" "-p" name "--name" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
]
depends: [
"base-unix"
"jbuilder" {build & >="1.0+beta9"}
"ppx_sexp_conv" {build}
"conduit"
"lwt" {>="3.0.0"}
]
available: [ocaml-version >= "4.03.0"]
2 changes: 2 additions & 0 deletions repo/darwin/packages/upstream/conduit-lwt.1.1.0/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/mirage/ocaml-conduit/releases/download/v1.1.0/conduit-1.1.0.tbz"
checksum: "eb1d02c80d06ef812d97dc1ab588b597"
37 changes: 37 additions & 0 deletions repo/darwin/packages/upstream/conduit.1.1.0/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
An OCaml network connection establishment library

[![Build Status](https://travis-ci.org/mirage/ocaml-conduit.svg?branch=master)](https://travis-ci.org/mirage/ocaml-conduit)

The `conduit` library takes care of establishing and listening for
TCP and SSL/TLS connections for the Lwt and Async libraries.

The reason this library exists is to provide a degree of abstraction
from the precise SSL library used, since there are a variety of ways
to bind to a library (e.g. the C FFI, or the Ctypes library), as well
as well as which library is used (just OpenSSL for now).

By default, OpenSSL is used as the preferred connection library, but
you can force the use of the pure OCaml TLS stack by setting the
environment variable `CONDUIT_TLS=native` when starting your program.

The opam packages available are:

- `conduit`: the main `Conduit` module
- `conduit-lwt`: the portable Lwt implementation
- `conduit-lwt-unix`: the Lwt/Unix implementation
- `conduit-async` the Jane Street Async implementation
- `mirage-conduit`: the MirageOS compatible implementation

### Debugging

Some of the `Lwt_unix`-based modules use a non-empty `CONDUIT_DEBUG`
environment variable to output debugging information to standard error.
Just set this variable when running the program to see what URIs
are being resolved to.

### Further Informartion

* **API Docs:** http://docs.mirage.io/
* **WWW:** https://github.com/mirage/ocaml-conduit
* **E-mail:** <mirageos-devel@lists.xenproject.org>
* **Bugs:** https://github.com/mirage/ocaml-conduit/issues
24 changes: 24 additions & 0 deletions repo/darwin/packages/upstream/conduit.1.1.0/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
opam-version: "1.2"
maintainer: "anil@recoil.org"
authors: ["Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg"]
homepage: "https://github.com/mirage/ocaml-conduit"
dev-repo: "https://github.com/mirage/ocaml-conduit.git"
bug-reports: "https://github.com/mirage/ocaml-conduit/issues"
tags: "org:mirage"
license: "ISC"

build: [
["jbuilder" "subst" "-p" name "--name" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
]
depends: [
"jbuilder" {build & >="1.0+beta9"}
"ppx_sexp_conv" {build}
"sexplib"
"astring"
"uri"
"result"
"logs" {>="0.5.0"}
"ipaddr" {>="2.5.0"}
]
available: [ocaml-version >= "4.03.0"]
2 changes: 2 additions & 0 deletions repo/darwin/packages/upstream/conduit.1.1.0/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/mirage/ocaml-conduit/releases/download/v1.1.0/conduit-1.1.0.tbz"
checksum: "eb1d02c80d06ef812d97dc1ab588b597"
2 changes: 2 additions & 0 deletions repo/darwin/packages/upstream/conf-gmp.1/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Virtual package relying on a GMP lib system installation.
This package can only install if the GMP lib is installed on the system.
8 changes: 8 additions & 0 deletions repo/darwin/packages/upstream/conf-gmp.1/files/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <gmp.h>
#ifndef __GMP_H__
#error "No GMP header"
#endif

void test(void) {
__gmp_init();
}
22 changes: 22 additions & 0 deletions repo/darwin/packages/upstream/conf-gmp.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
opam-version: "1.2"
maintainer: "nbraud"
author: "nbraud"
homepage: "http://gmplib.org/"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
dev-repo: "https://github.com/ocaml/opam-repository.git"
license: "GPL"
build: [
["sh" "-exc" "cc -c $CFLAGS -I/usr/local/include test.c"] {os != "darwin"}
["sh" "-exc" "cc -c $CFLAGS -I/opt/local/include -I/usr/local/include test.c"] {os = "darwin"}
]
depexts: [
[["debian"] ["libgmp-dev"]]
[["ubuntu"] ["libgmp-dev"]]
[["osx" "homebrew"] ["gmp"]]
[["centos"] ["gmp" "gmp-devel"]]
[["fedora"] ["gmp" "gmp-devel"]]
[["openbsd"] ["gmp"]]
[["freebsd"] ["gmp"]]
[["alpine"] ["gmp-dev"]]
[["opensuse"] ["gmp-devel"]]
]
2 changes: 2 additions & 0 deletions repo/darwin/packages/upstream/conf-perl.1/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Virtual package relying on perl
This package can only install if the perl program is installed on the system.
15 changes: 15 additions & 0 deletions repo/darwin/packages/upstream/conf-perl.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
opam-version: "1.2"
maintainer: "tim@gfxmonk.net"
homepage: "https://www.perl.org/"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
dev-repo: "https://github.com/ocaml/opam-repository.git"
license: "GPL-1+"
build: [["perl" "--version"]]
depexts: [
[["debian"] ["perl"]]
[["ubuntu"] ["perl"]]
[["alpine"]["perl"]]
[["nixpkgs"] ["perl"]]
[["archlinux"] ["perl"]]
[["fedora"] ["perl-Pod-Html"]]
]
26 changes: 26 additions & 0 deletions repo/darwin/packages/upstream/cpuid.0.1.1/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Detect CPU features


cpuid allows detection of CPU features from OCaml.

cpuid is distributed under the ISC license.

## Installation

cpuid can be installed with `opam`:

opam install cpuid

If you don't use `opam` consult the [`opam`](opam) file for build
instructions.

## Documentation

The documentation and API reference is automatically generated by
`ocamldoc` from the interfaces. It can be consulted [online][doc]
and there is a generated version in the `doc` directory of the
distribution.

[doc]: https://pqwy.github.io/cpuid/doc

[![Build Status](https://travis-ci.org/pqwy/cpuid.svg?branch=master)](https://travis-ci.org/pqwy/cpuid)
19 changes: 19 additions & 0 deletions repo/darwin/packages/upstream/cpuid.0.1.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
opam-version: "1.2"
maintainer: "David Kaloper Meršinjak <david@numm.org>"
authors: ["David Kaloper Meršinjak <david@numm.org>"]
homepage: "https://github.com/pqwy/cpuid"
doc: "https://pqwy.github.io/cpuid/doc"
license: "ISC"
dev-repo: "https://github.com/pqwy/cpuid.git"
bug-reports: "https://github.com/pqwy/cpuid/issues"
tags: []
available: [ ocaml-version >= "4.01.0" ]
build: [ "ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "false" ]
depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"topkg" {build}
"ocb-stubblr" {build}
"result" ]
depopts: []
conflicts: [ "ocb-stubblr" {<"0.1.0"} ]
2 changes: 2 additions & 0 deletions repo/darwin/packages/upstream/cpuid.0.1.1/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/pqwy/cpuid/releases/download/v0.1.1/cpuid-0.1.1.tbz"
checksum: "717a6bf371bd083ea588ccd96f328dc2"
2 changes: 1 addition & 1 deletion repo/darwin/packages/upstream/hvsock.1.0.1/opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ depends: [
"base-bytes"
"base-threads"
"base-unix"
"lwt" {>= "2.4.7"}
"lwt" {>= "2.4.7" & < "4.0.0"}
"logs"
"fmt"
"cmdliner"
Expand Down
4 changes: 0 additions & 4 deletions repo/darwin/packages/upstream/lwt.3.3.0/opam
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,3 @@ messages: [
"For Lwt_log and Lwt_daemon, please install package lwt_log"
{!lwt_log:installed}
]
post-messages: [
"Lwt 4.0.0 will make some breaking changes in March 2018. See
https://github.com/ocsigen/lwt/issues/453"
]
26 changes: 26 additions & 0 deletions repo/darwin/packages/upstream/magic-mime.1.1.0/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Map filenames to common MIME types

This library contains a database of MIME types that maps filename extensions
into MIME types suitable for use in many Internet protocols such as HTTP or
e-mail. It is generated from the `mime.types` file found in Unix systems, but
has no dependency on a filesystem since it includes the contents of the
database as an ML datastructure.

For example, here's how to lookup MIME types in the [utop] REPL:

#require "magic-mime";;
Magic_mime.lookup "/foo/bar.txt";;
- : bytes = "text/plain"
Magic_mime.lookup "bar.css";;
- : bytes = "text/css"

### Internals

The following files need to be edited to add MIME types:

- mime.types: this is obtained by synching from the Apache Foundation's
[mime.types](https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
in the Apache Subversion repository.
- x-mime.types: these are the extension types, so non-standard `x-` prefixes are used here.
- file.types: full filenames of common occurrences that are useful to map onto a MIME type.
OCaml-specific things like `opam` files show up here.
Loading