unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* header parsing
@ 2011-09-09 18:42 Ian Price
  2011-09-09 19:08 ` Ian Price
  2011-09-10 18:20 ` Andy Wingo
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Price @ 2011-09-09 18:42 UTC (permalink / raw)
  To: bug-guile


Hi guilers,

Writing a quick script the other day I came across two issues when
guile parses http headers. The first is that 'parse-rfc-822-date' does
not allow for single digit days, which are allowed in rfc822/1123 [0].

Secondly, a non-guile problem, is that many sites don't quote their
etags. While I can (and did) account for this myself with
'declare-header!', I was wondering if it would be better to modify
'parse-qstring' to fallback to 'parse-opaque-string' if the start isn't
a #\" character. This would be in line with Postel's law[1], but the
commentary at the top of http.scm says there shouldn't be too many
compatibility hacks.

Patches are supplied for both.

[0]. https://tools.ietf.org/html/rfc822#section-5.1 (see 1*2DIGIT)
[1]. Be conservative in what you send; be liberal in what you accept.
-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-10 20:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-09 18:42 header parsing Ian Price
2011-09-09 19:08 ` Ian Price
2011-09-10 18:20 ` Andy Wingo
2011-09-10 20:02   ` Ian Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).