Performance improvement and benchmark

n/t

cc @bnoordhuis
Sounds like a good test-case to add?

On Fri, Nov 28, 2014 at 3:48 PM, Ben Noordhuis <notifications@github.com>
wrote:

> In http_parser.c:
>
> >
> > -        c = LOWER(ch);
> > +          switch (h_state) {
> > +            case h_general:
> > +            {
> > +              const char* pos;
> > +
> > +              pos = memchr(p, CR, data + len - p);
> > +              if (pos == NULL)
> > +                pos = memchr(p, LF, data + len - p);
>
> I'm not sure I follow. With "Foo: bar\nBar: baz\r\n" as input, this code
> would skip to the '\r' character and miss the Baz header altogether,
> right?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/joyent/http-parser/pull/200/files#r21046830>.
>