aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-03 21:11:28 +0200
committerLoïc Hoguin <[email protected]>2018-06-03 21:11:28 +0200
commit1be0151ec7b6a98064e648d5598f56cbdec65dc7 (patch)
tree48cab796ea085c658d799b8d10dbc638d9e43934
parent34307a584149abbf0b2e5b33beb2fca4c585b0d1 (diff)
downloadgun-1be0151ec7b6a98064e648d5598f56cbdec65dc7.tar.gz
gun-1be0151ec7b6a98064e648d5598f56cbdec65dc7.tar.bz2
gun-1be0151ec7b6a98064e648d5598f56cbdec65dc7.zip
Rename gun_data and gun_sse to gun_data_h and gun_sse_h
-rw-r--r--doc/src/manual/gun.asciidoc4
-rw-r--r--ebin/gun.app2
-rw-r--r--src/gun_data_h.erl (renamed from src/gun_data.erl)2
-rw-r--r--src/gun_http.erl2
-rw-r--r--src/gun_http2.erl2
-rw-r--r--src/gun_sse_h.erl (renamed from src/gun_sse.erl)2
-rw-r--r--test/sse_SUITE.erl4
7 files changed, 9 insertions, 9 deletions
diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc
index 45f65ab..b5ed039 100644
--- a/doc/src/manual/gun.asciidoc
+++ b/doc/src/manual/gun.asciidoc
@@ -94,7 +94,7 @@ Configuration for the HTTP protocol.
The default value is given next to the option name:
-// @todo Document content_handlers and gun_sse.
+// @todo Document content_handlers and gun_sse_h.
keepalive (5000)::
@@ -129,7 +129,7 @@ Configuration for the HTTP/2 protocol.
The default value is given next to the option name:
-// @todo Document content_handlers and gun_sse.
+// @todo Document content_handlers and gun_sse_h.
keepalive (5000)::
diff --git a/ebin/gun.app b/ebin/gun.app
index de3896c..f40aefd 100644
--- a/ebin/gun.app
+++ b/ebin/gun.app
@@ -1,7 +1,7 @@
{application, 'gun', [
{description, "HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP."},
{vsn, "1.0.0-pre.5"},
- {modules, ['gun','gun_app','gun_content_handler','gun_data','gun_http','gun_http2','gun_sse','gun_sup','gun_ws','gun_ws_h']},
+ {modules, ['gun','gun_app','gun_content_handler','gun_data_h','gun_http','gun_http2','gun_sse_h','gun_sup','gun_ws','gun_ws_h']},
{registered, [gun_sup]},
{applications, [kernel,stdlib,ssl,cowlib,ranch]},
{mod, {gun_app, []}},
diff --git a/src/gun_data.erl b/src/gun_data_h.erl
index e70c25e..826d70c 100644
--- a/src/gun_data.erl
+++ b/src/gun_data_h.erl
@@ -12,7 +12,7 @@
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--module(gun_data).
+-module(gun_data_h).
-behavior(gun_content_handler).
-export([init/5]).
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 4fc6a17..2fd0aac 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -80,7 +80,7 @@ name() -> http.
init(Owner, Socket, Transport, Opts) ->
Version = maps:get(version, Opts, 'HTTP/1.1'),
- Handlers = maps:get(content_handlers, Opts, [gun_data]),
+ Handlers = maps:get(content_handlers, Opts, [gun_data_h]),
TransformHeaderName = maps:get(transform_header_name, Opts, fun (N) -> N end),
#http_state{owner=Owner, socket=Socket, transport=Transport, version=Version,
content_handlers=Handlers, transform_header_name=TransformHeaderName}.
diff --git a/src/gun_http2.erl b/src/gun_http2.erl
index 558dce5..1f25e83 100644
--- a/src/gun_http2.erl
+++ b/src/gun_http2.erl
@@ -96,7 +96,7 @@ do_check_options([Opt|_]) ->
name() -> http2.
init(Owner, Socket, Transport, Opts) ->
- Handlers = maps:get(content_handlers, Opts, [gun_data]),
+ Handlers = maps:get(content_handlers, Opts, [gun_data_h]),
State = #http2_state{owner=Owner, socket=Socket,
transport=Transport, opts=Opts, content_handlers=Handlers},
#http2_state{local_settings=Settings} = State,
diff --git a/src/gun_sse.erl b/src/gun_sse_h.erl
index 4a898d4..a2ac809 100644
--- a/src/gun_sse.erl
+++ b/src/gun_sse_h.erl
@@ -12,7 +12,7 @@
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--module(gun_sse).
+-module(gun_sse_h).
-behavior(gun_content_handler).
-export([init/5]).
diff --git a/test/sse_SUITE.erl b/test/sse_SUITE.erl
index b218fa2..21180be 100644
--- a/test/sse_SUITE.erl
+++ b/test/sse_SUITE.erl
@@ -22,7 +22,7 @@ all() ->
http(_) ->
{ok, Pid} = gun:open("sse.now.sh", 443, #{
protocols => [http],
- http_opts => #{content_handlers => [gun_sse, gun_data]}
+ http_opts => #{content_handlers => [gun_sse_h, gun_data_h]}
}),
{ok, http} = gun:await_up(Pid),
common(Pid).
@@ -30,7 +30,7 @@ http(_) ->
http2(_) ->
{ok, Pid} = gun:open("sse.now.sh", 443, #{
protocols => [http2],
- http2_opts => #{content_handlers => [gun_sse, gun_data]}
+ http2_opts => #{content_handlers => [gun_sse_h, gun_data_h]}
}),
{ok, http2} = gun:await_up(Pid),
common(Pid).