mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Rename cowboy_http_req to cowboy_req
This commit is contained in:
parent
9e2622becb
commit
d3dcaf109b
26 changed files with 115 additions and 115 deletions
|
@ -231,7 +231,7 @@ rest_init(Req, Opts) ->
|
|||
end,
|
||||
{Filepath, Req1} = case lists:keyfind(file, 1, Opts) of
|
||||
{_, Filepath2} -> {filepath_path(Filepath2), Req};
|
||||
false -> cowboy_http_req:path_info(Req)
|
||||
false -> cowboy_req:path_info(Req)
|
||||
end,
|
||||
State = case check_path(Filepath) of
|
||||
error ->
|
||||
|
@ -320,7 +320,7 @@ content_types_provided(Req, #state{filepath=Filepath,
|
|||
-spec file_contents(#http_req{}, #state{}) -> tuple().
|
||||
file_contents(Req, #state{filepath=Filepath,
|
||||
fileinfo={ok, #file_info{size=Filesize}}}=State) ->
|
||||
{ok, Transport, Socket} = cowboy_http_req:transport(Req),
|
||||
{ok, Transport, Socket} = cowboy_req:transport(Req),
|
||||
Writefile = content_function(Transport, Socket, Filepath),
|
||||
{{stream, Filesize, Writefile}, Req, State}.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue