let parse_request_fst_line ic =
let request_line = generic_input_line ~sep:crlf ~ic in
+ debug_print (sprintf "HTTP request line (not yet parsed): %s" request_line);
match Pcre.split ~rex:pieces_sep request_line with
| [ meth_raw; uri_raw; http_version_raw ] ->
(try
match generic_input_line ~sep:crlf ~ic with
| "" -> List.rev headers
| line ->
- (let subs = Pcre.extract ~rex:header_RE line in
+ (let subs =
+ try
+ Pcre.extract ~rex:header_RE line
+ with Not_found -> raise (Invalid_header line)
+ in
let header =
try
subs.(1)