0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
cowboy/test/handlers/input_crash_h.erl
2015-02-03 18:54:26 +01:00

10 lines
261 B
Erlang

%% This module crashes on request input data
%% depending on the given option.
-module(input_crash_h).
-export([init/2]).
init(Req, content_length) ->
cowboy_error_h:ignore(erlang, binary_to_integer, 1),
cowboy_req:parse_header(<<"content-length">>, Req).