File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,16 +299,18 @@ READ_HEADER:
299299 # check that they are all numbers (RFC: Content-Length = 1*DIGIT)
300300 my @nums = grep { / ^[0-9]+$ / } @vals ;
301301 unless (@vals == @nums ) {
302- $self -> send_error(400);
303- $self -> reason(" Content-Length value must be a unsigned integer" );
302+ my $reason = " Content-Length value must be an unsigned integer" ;
303+ $self -> send_error(400, $reason );
304+ $self -> reason($reason );
304305 return ;
305306 }
306307 # check they are all the same
307308 my $ct_len = shift @nums ;
308309 foreach (@nums ) {
309310 next if $_ == $ct_len ;
310- $self -> send_error(400);
311- $self -> reason(" Content-Length values are not the same" );
311+ my $reason = " Content-Length values are not the same" ;
312+ $self -> send_error(400, $reason );
313+ $self -> reason($reason );
312314 return ;
313315 }
314316 # ensure we have now a fixed header, with only 1 value
You can’t perform that action at this time.
0 commit comments