avsm/ocaml-cohttp — pull request #100 by rgrinberg (2014-03-20 04:05:49+00:00)
Title: Re str removals

This PR contains removal of using Re_str to split on a single character (in the {,un}bounded case).

The purpose of this is 2 fold:

1. Hand crafting parsers for these common cases should be faster than using regular expressions
2. Re_str is not in a great state currently.

After this PR there's only a handful of uses left but admittedly they're a little more complicated so it's ok to rely on regular expressions for them (but NOT Re_str anyway).

Looking at ocaml-uri I see that most uses fall into the same usage pattern - splitting strings on a character. So if this change is welcomed I'm happy to fix ocaml-uri as well which I think should be much easier.

Final note: cohttp may now join a long list of libraries that ends up re-implementing these common functions. In this particular case we could have relied on core instead however but it's clear that most lwt users are against this so I just decided to kick that can down the road.