rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Rack::ConditionalGet should check for ETag header, not Etag
@ 2010-03-04 20:13 Jeremy Kemper
  2010-03-04 20:25 ` Jeremy Kemper
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Kemper @ 2010-03-04 20:13 UTC (permalink / raw)
  To: rack-devel

For your consideration: a bug fix for Rack::ConditionalGet.

The middleware checks for headers['Etag'] when it should be checking for 'ETag'.

The bug is masked by the specs which use a case-indifferent
HeaderHash. Fixed and added a spec that returns a headers Hash.

http://github.com/jeremy/rack/commit/e59456ade9f7d4e82742913bbcad927ca5e28859

jeremy

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

* Re: Rack::ConditionalGet should check for ETag header, not Etag
  2010-03-04 20:13 Rack::ConditionalGet should check for ETag header, not Etag Jeremy Kemper
@ 2010-03-04 20:25 ` Jeremy Kemper
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Kemper @ 2010-03-04 20:25 UTC (permalink / raw)
  To: rack-devel

On Thu, Mar 4, 2010 at 12:13 PM, Jeremy Kemper <jeremy@bitsweat.net> wrote:
> For your consideration: a bug fix for Rack::ConditionalGet.
>
> The middleware checks for headers['Etag'] when it should be checking for 'ETag'.
>
> The bug is masked by the specs which use a case-indifferent
> HeaderHash. Fixed and added a spec that returns a headers Hash.

This is wrong. I glossed over the explicit use of HeadersHash in the
middleware, and it was masked by an error in the failing spec I'd just
written.

Nevertheless, it's a good idea to use the correct header name, so the
patch stands.

jeremy

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

end of thread, other threads:[~2010-03-04 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-04 20:13 Rack::ConditionalGet should check for ETag header, not Etag Jeremy Kemper
2010-03-04 20:25 ` Jeremy Kemper

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).