Loïc Hoguin
e8286e18e6
Remove the include/types.hrl file.
2011-04-18 13:56:38 +02:00
Loïc Hoguin
63a92df14e
Replace port_number() by ip_port() from kernel/include/inet.hrl.
2011-04-18 13:52:32 +02:00
Loïc Hoguin
731d839323
Replace posix() by atom(), for now.
...
The type isn't exported by OTP so we don't win much.
Also, inet.erl and file.erl define posix() différently,
so OTP needs to stop being so confuse in the first place
before we can attempt to use it properly.
2011-04-18 13:32:35 +02:00
Loïc Hoguin
db7833f5e8
Move the type application_start_type() into cowboy_app.
2011-04-18 13:27:42 +02:00
Loïc Hoguin
2beb5c8206
Move the dispatcher related types into cowboy_dispatcher.
2011-04-18 13:24:27 +02:00
Loïc Hoguin
6712eaa5c8
Rename match() into match_rule().
2011-04-18 12:20:52 +02:00
Loïc Hoguin
ef2673b61e
Rename dispatch() into dispatch_rules().
2011-04-18 12:14:13 +02:00
Loïc Hoguin
ecf117b375
Rename dispatch_rules() into dispatch_rule().
2011-04-18 12:06:53 +02:00
Loïc Hoguin
02d825e003
Move HTTP types definitions to include/http.hrl (for now).
2011-04-18 00:25:04 +02:00
Loïc Hoguin
61d755f8cc
Move the opaque type sslsocket() out of include/types.hrl.
2011-04-18 00:09:12 +02:00
Loïc Hoguin
15dc645596
Use the inet:socket() type instead of the user-defined one.
2011-04-18 00:06:26 +02:00
Loïc Hoguin
9ad32386c0
Use the inet:ip_address() type instead of the user-defined one.
2011-04-17 23:57:30 +02:00
Loïc Hoguin
c285f00349
Fix the type spec for qs_vals, a list of key/values.
2011-03-27 01:07:01 +01:00
Loïc Hoguin
d4c071c2d0
Fix the type spec for path_tokens, a list of *non empty* strings.
2011-03-22 12:26:07 +01:00
Loïc Hoguin
0c0b75f76b
Fix spec for the #http_spec.path record field.
2011-03-21 22:32:02 +01:00
Loïc Hoguin
193968d53e
Fix spec for cowboy_dispatcher:split_host/1.
2011-03-21 22:13:27 +01:00
Loïc Hoguin
8b02992e6a
Skip the request body if it hasn't been read by the handler.
2011-03-21 17:47:17 +01:00
Loïc Hoguin
71b31cee92
Make sure we can only reply to an HTTP request inside Handler:handle.
...
Of course since requests are a record the response state can be explicitly
overriden, but standard use prevents errors by making sure only one reply
is sent.
2011-03-20 18:03:36 +01:00
Loïc Hoguin
b874b28561
Save the raw path string in the request.
2011-03-20 00:01:29 +01:00
Loïc Hoguin
8085529f48
Save the raw host string in the request.
2011-03-19 23:57:23 +01:00
Loïc Hoguin
a4f8bb6573
Add support for the '*' path.
...
Mostly used by the following request: OPTIONS * HTTP/1.1
2011-03-19 18:53:59 +01:00
Loïc Hoguin
2c52a30b0a
Rewrite the dispatcher to take a list of host each having a list of paths.
...
* Makes more sense to parse the host only once instead of for each path.
* Allows proper handling of: If the host is not a valid host on the server,
the response MUST be a 400 (Bad Request) error.
2011-03-19 17:42:03 +01:00
Loïc Hoguin
408f167621
Move the reply function to cowboy_http_req.
2011-03-18 22:38:26 +01:00
Loïc Hoguin
da72255940
Initial commit.
2011-03-17 00:29:35 +01:00