aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_default_event_h.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-07-03 16:53:36 +0200
committerLoïc Hoguin <[email protected]>2019-07-03 16:53:36 +0200
commitd6b7ec654a876531dc0cfc7c65350d354bda2f52 (patch)
treea7f5e0eb9ff1647db963b204409f7d0bfe765ea7 /src/gun_default_event_h.erl
parent4a6503186bf3a72880e7c99be76406550aeded96 (diff)
downloadgun-d6b7ec654a876531dc0cfc7c65350d354bda2f52.tar.gz
gun-d6b7ec654a876531dc0cfc7c65350d354bda2f52.tar.bz2
gun-d6b7ec654a876531dc0cfc7c65350d354bda2f52.zip
Add the response_start event
Thought it needed cow_http2_machine changes but everything was available. For HTTP/1.1 it is triggered when receiving data while expecting headers. For HTTP/2 it is triggered after we have received a HEADERS frame for streams in idle state.
Diffstat (limited to 'src/gun_default_event_h.erl')
-rw-r--r--src/gun_default_event_h.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gun_default_event_h.erl b/src/gun_default_event_h.erl
index 4156ed7..cd48fc2 100644
--- a/src/gun_default_event_h.erl
+++ b/src/gun_default_event_h.erl
@@ -21,6 +21,7 @@
-export([request_start/2]).
-export([request_headers/2]).
-export([request_end/2]).
+-export([response_start/2]).
-export([response_inform/2]).
-export([response_headers/2]).
-export([response_end/2]).
@@ -45,6 +46,9 @@ request_headers(_EventData, State) ->
request_end(_EventData, State) ->
State.
+response_start(_EventData, State) ->
+ State.
+
response_inform(_EventData, State) ->
State.