aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/README.md10
-rw-r--r--doc/overview.edoc4
-rw-r--r--erlang.mk21
-rw-r--r--guide/getting_started.md4
-rw-r--r--manual/cowboy_app.md5
-rw-r--r--src/cowboy_http.erl4
6 files changed, 22 insertions, 26 deletions
diff --git a/doc/README.md b/doc/README.md
deleted file mode 100644
index 24e092f..0000000
--- a/doc/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Cowboy documentation
-====================
-
-Documentation for Cowboy is available online at the following addresses:
-
- * [README](http://ninenines.eu/docs/en/cowboy/HEAD/README)
- * [User Guide](http://ninenines.eu/docs/en/cowboy/HEAD/guide/introduction)
-
-This folder is used for generating the Reference Manual. You can generate
-it yourself by typing `make docs` in the top-level Cowboy directory.
diff --git a/doc/overview.edoc b/doc/overview.edoc
deleted file mode 100644
index aa5e4c6..0000000
--- a/doc/overview.edoc
+++ /dev/null
@@ -1,4 +0,0 @@
-@author Lo�c Hoguin <[email protected]>
-@copyright 2011-2012 Lo�c Hoguin
-@version HEAD
-@title Small, fast, modular HTTP server.
diff --git a/erlang.mk b/erlang.mk
index d5fa2aa..107cdd5 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -24,7 +24,7 @@ export PKG_FILE
PKG_FILE_URL ?= https://raw.github.com/extend/erlang.mk/master/packages.v1.tsv
define get_pkg_file
- wget -O $(PKG_FILE) $(PKG_FILE_URL) || rm $(PKG_FILE)
+ wget --no-check-certificate -O $(PKG_FILE) $(PKG_FILE_URL) || rm $(PKG_FILE)
endef
# Verbosity and tweaks.
@@ -58,7 +58,8 @@ ifneq ($(wildcard $(RELX_CONFIG)),)
RELX ?= $(CURDIR)/relx
export RELX
-RELX_URL ?= https://github.com/erlware/relx/releases/download/0.4.0/relx
+RELX_URL ?= https://github.com/erlware/relx/releases/download/v0.5.2/relx
+RELX_OPTS ?=
define get_relx
wget -O $(RELX) $(RELX_URL) || rm $(RELX)
@@ -66,7 +67,7 @@ define get_relx
endef
rel: clean-rel all $(RELX)
- @$(RELX)
+ @$(RELX) -c $(RELX_CONFIG) $(RELX_OPTS)
$(RELX):
@$(call get_relx)
@@ -89,7 +90,13 @@ ALL_TEST_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(TEST_DEPS))
# Application.
-ERL_LIBS ?= $(DEPS_DIR)
+ifeq ($(filter $(DEPS_DIR),$(subst :, ,$(ERL_LIBS))),)
+ifeq ($(ERL_LIBS),)
+ ERL_LIBS = $(DEPS_DIR)
+else
+ ERL_LIBS := $(ERL_LIBS):$(DEPS_DIR)
+endif
+endif
export ERL_LIBS
ERLC_OPTS ?= -Werror +debug_info +warn_export_all +warn_export_vars \
@@ -106,7 +113,7 @@ app: ebin/$(PROJECT).app
$(eval MODULES := $(shell find ebin -type f -name \*.beam \
| sed 's/ebin\///;s/\.beam/,/' | sed '$$s/.$$//'))
$(appsrc_verbose) cat src/$(PROJECT).app.src \
- | sed 's/{modules,\s*\[\]}/{modules, \[$(MODULES)\]}/' \
+ | sed 's/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/' \
> ebin/$(PROJECT).app
define compile_erl
@@ -189,9 +196,11 @@ clean-deps:
# Documentation.
+EDOC_OPTS ?=
+
docs: clean-docs
$(gen_verbose) erl -noshell \
- -eval 'edoc:application($(PROJECT), ".", []), init:stop().'
+ -eval 'edoc:application($(PROJECT), ".", [$(EDOC_OPTS)]), init:stop().'
clean-docs:
$(gen_verbose) rm -f doc/*.css doc/*.html doc/*.png doc/edoc-info
diff --git a/guide/getting_started.md b/guide/getting_started.md
index 4d3e7ab..8c01c7d 100644
--- a/guide/getting_started.md
+++ b/guide/getting_started.md
@@ -143,7 +143,7 @@ Listeners are a group of processes that are used to accept and manage
connections. The processes used specifically for accepting connections
are called acceptors. The number of acceptor processes is unrelated to
the maximum number of connections Cowboy can handle. Please refer to
-the [Ranch guide](http://ninenines.eu/docs/en/ranch/HEAD/guide/toc)
+the [Ranch guide](http://ninenines.eu/docs/en/ranch/HEAD/guide/)
for in-depth information.
Listeners are named. They spawn a given number of acceptors, listen for
@@ -157,7 +157,7 @@ we will simply map all URLs to our handler `hello_handler`,
using the wildcard `_` for both the hostname and path parts
of the URL.
-This is how the `hello_erlang_app:start/2` function looks like
+This is what the `hello_erlang_app:start/2` function looks like
with Cowboy initialized.
``` erlang
diff --git a/manual/cowboy_app.md b/manual/cowboy_app.md
index 9fe316d..2a086de 100644
--- a/manual/cowboy_app.md
+++ b/manual/cowboy_app.md
@@ -7,8 +7,9 @@ Dependencies
------------
The `cowboy` application uses the Erlang applications `ranch`
-for listening and accepting TCP connections, and `crypto`
-for establishing Websocket connections. These dependencies must
+for listening and accepting TCP connections, `crypto` for
+establishing Websocket connections, and `cowlib` for parsing and
+building messages for Web protocols. These dependencies must
be loaded for the `cowboy` application to work. In an embedded
environment this means that they need to be started with the
`application:start/{1,2}` function before the `cowboy`
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index ac4a30f..499173c 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -1030,11 +1030,11 @@ urlencode(<<>>, Acc, _Plus, _Upper) ->
-spec tohexu(byte()) -> byte().
tohexu(C) when C < 10 -> $0 + C;
-tohexu(C) when C < 17 -> $A + C - 10.
+tohexu(C) when C < 16 -> $A + C - 10.
-spec tohexl(byte()) -> byte().
tohexl(C) when C < 10 -> $0 + C;
-tohexl(C) when C < 17 -> $a + C - 10.
+tohexl(C) when C < 16 -> $a + C - 10.
%% Tests.