Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Bug parsing first caracter of header field #13

Closed
arhrodriguez opened this issue Aug 24, 2010 · 4 comments · Fixed by #64
Closed

Bug parsing first caracter of header field #13

arhrodriguez opened this issue Aug 24, 2010 · 4 comments · Fixed by #64

Comments

@arhrodriguez
Copy link

We found a bug while parsing the above url: http://www.aldeaglobal.net.ar/

Once again the problem reside on the header response. The first caracter on the header field shoud be
an ascii between a to z, but we found a '.' (dot). The web browser does not seem to have a problem.

Regards.

@mnot
Copy link

mnot commented Oct 6, 2010

This appears to be caused by this:
if (c < 'a' || 'z' < c) goto error;

which rejects non-alphabetic first characters. The BNF for the field name in HTTP is 'token' which accepts a much broader range of characters (see http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-11#section-1.2.2).

@ry
Copy link
Contributor

ry commented Nov 11, 2010

Fixed in 51de89f
Dots tested in b75cea5

@mnot
Copy link

mnot commented Nov 12, 2010

32 (space), 34 (dquote), 49 (forward slash), 125 (right curly brace) are all specials / separators.

@pgriess pgriess closed this as completed Sep 8, 2011
@pgriess pgriess reopened this Sep 8, 2011
@pgriess
Copy link
Contributor

pgriess commented Sep 8, 2011

Oops, didn't mean to close this. There's a pull request out for this fix now. If nobody complains w/in a few days, I'll merge it in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants