aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-04-18 00:25:04 +0200
committerLoïc Hoguin <[email protected]>2011-04-18 00:25:04 +0200
commit02d825e003c9b9013406f67ba7f9dba5dd241b18 (patch)
tree9761fbb7ca10b3e6a0fd946554b3771d1ed19507
parent61d755f8cc602d019095fd17560cbda6ba081c15 (diff)
downloadcowboy-02d825e003c9b9013406f67ba7f9dba5dd241b18.tar.gz
cowboy-02d825e003c9b9013406f67ba7f9dba5dd241b18.tar.bz2
cowboy-02d825e003c9b9013406f67ba7f9dba5dd241b18.zip
Move HTTP types definitions to include/http.hrl (for now).
-rw-r--r--include/http.hrl24
-rw-r--r--include/types.hrl24
2 files changed, 24 insertions, 24 deletions
diff --git a/include/http.hrl b/include/http.hrl
index fe5c796..6e46d5f 100644
--- a/include/http.hrl
+++ b/include/http.hrl
@@ -12,6 +12,30 @@
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+-type http_method() :: 'OPTIONS' | 'GET' | 'HEAD'
+ | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | string().
+-type http_uri() :: '*' | {absoluteURI, http | https, Host::string(),
+ Port::integer() | undefined, Path::string()}
+ | {scheme, Scheme::string(), string()}
+ | {abs_path, string()} | string().
+-type http_version() :: {Major::integer(), Minor::integer()}.
+-type http_header() :: 'Cache-Control' | 'Connection' | 'Date' | 'Pragma'
+ | 'Transfer-Encoding' | 'Upgrade' | 'Via' | 'Accept' | 'Accept-Charset'
+ | 'Accept-Encoding' | 'Accept-Language' | 'Authorization' | 'From' | 'Host'
+ | 'If-Modified-Since' | 'If-Match' | 'If-None-Match' | 'If-Range'
+ | 'If-Unmodified-Since' | 'Max-Forwards' | 'Proxy-Authorization' | 'Range'
+ | 'Referer' | 'User-Agent' | 'Age' | 'Location' | 'Proxy-Authenticate'
+ | 'Public' | 'Retry-After' | 'Server' | 'Vary' | 'Warning'
+ | 'Www-Authenticate' | 'Allow' | 'Content-Base' | 'Content-Encoding'
+ | 'Content-Language' | 'Content-Length' | 'Content-Location'
+ | 'Content-Md5' | 'Content-Range' | 'Content-Type' | 'Etag'
+ | 'Expires' | 'Last-Modified' | 'Accept-Ranges' | 'Set-Cookie'
+ | 'Set-Cookie2' | 'X-Forwarded-For' | 'Cookie' | 'Keep-Alive'
+ | 'Proxy-Connection' | string().
+-type http_headers() :: list({http_header(), string()}).
+%% -type http_cookies() :: term(). %% @todo
+-type http_status() :: non_neg_integer() | string().
+
-record(http_req, {
%% Transport.
socket = undefined :: undefined | inet:socket(),
diff --git a/include/types.hrl b/include/types.hrl
index c891db8..fe4e6db 100644
--- a/include/types.hrl
+++ b/include/types.hrl
@@ -25,27 +25,3 @@
-type dispatch_rules() :: {Host::match(), list({Path::match(),
Handler::module(), Opts::term()})}.
-type dispatch() :: list(dispatch_rules()).
-
--type http_method() :: 'OPTIONS' | 'GET' | 'HEAD'
- | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | string().
--type http_uri() :: '*' | {absoluteURI, http | https, Host::string(),
- Port::integer() | undefined, Path::string()}
- | {scheme, Scheme::string(), string()}
- | {abs_path, string()} | string().
--type http_version() :: {Major::integer(), Minor::integer()}.
--type http_header() :: 'Cache-Control' | 'Connection' | 'Date' | 'Pragma'
- | 'Transfer-Encoding' | 'Upgrade' | 'Via' | 'Accept' | 'Accept-Charset'
- | 'Accept-Encoding' | 'Accept-Language' | 'Authorization' | 'From' | 'Host'
- | 'If-Modified-Since' | 'If-Match' | 'If-None-Match' | 'If-Range'
- | 'If-Unmodified-Since' | 'Max-Forwards' | 'Proxy-Authorization' | 'Range'
- | 'Referer' | 'User-Agent' | 'Age' | 'Location' | 'Proxy-Authenticate'
- | 'Public' | 'Retry-After' | 'Server' | 'Vary' | 'Warning'
- | 'Www-Authenticate' | 'Allow' | 'Content-Base' | 'Content-Encoding'
- | 'Content-Language' | 'Content-Length' | 'Content-Location'
- | 'Content-Md5' | 'Content-Range' | 'Content-Type' | 'Etag'
- | 'Expires' | 'Last-Modified' | 'Accept-Ranges' | 'Set-Cookie'
- | 'Set-Cookie2' | 'X-Forwarded-For' | 'Cookie' | 'Keep-Alive'
- | 'Proxy-Connection' | string().
--type http_headers() :: list({http_header(), string()}).
-%% -type http_cookies() :: term(). %% @todo
--type http_status() :: non_neg_integer() | string().