aboutsummaryrefslogblamecommitdiffstats
path: root/test/handlers/input_crash_h.erl
blob: c67bb0c1ef85c34dd0e732ddc47f747fdcce424c (plain) (tree)
1
2
3
4
5
6
7
8
9




                                            
                  
 
                            
                                                            
                                                           
%% 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).