Commits

Anonymous committed b2a74a8

http headers processing: replaced String.trim_count

Comments (0)

Files changed (1)

src/amall_http.ml

           I.return & List.rev acc
         else
           (* process the header *)
-          let (first_spaces, header_line, _last_spaces) =
-            String.trim_count is_whitespace header_line in
-          if first_spaces > 0
+          if is_whitespace header_line.[0]
           then
             match acc with
             [ [] -> fail "first header starts with whitespace"
             | [last :: others] ->
-                read_headers [(last ^ " " ^ header_line) :: others]
+                read_headers [(last ^ header_line) :: others]
             ]
           else
             read_headers [header_line :: acc]