* [ANN] yahns 1.4.0 - minor internal cleanups and bugfixes
@ 2014-11-16 11:13 5% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2014-11-16 11:13 UTC (permalink / raw)
To: yahns-public
- http_client: clear some internal ivars on rack.hijack
- README: minor updates
- extras/autoindex: do not link beyond top-level
- extras/autoindex: fix misnamed variable
- extras/autoindex: integrate with TryGzipStatic
- queue: remove TODO comment for kqueue
- switch to require_relative for internal requires
- README: add OpenSSL exception
- stream_input: favor str.clear instead of str.replace('')
- http_response: skip Date header case-insensitively
* git clone git://yhbt.net/yahns
* http://yahns.yhbt.net/README
* http://yahns.yhbt.net/NEWS.atom.xml
* yahns-public@yhbt.net
^ permalink raw reply [relevance 5%]
* [PATCH] http_response: skip Date header case-insensitively
@ 2014-11-16 4:21 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2014-11-16 4:21 UTC (permalink / raw)
To: yahns-public
HTTP headers are compared case-insensitively, so we must filter out
the Date header case-insensitively. Found via casual code
inspection, I doubt anybody sets a Date header in Rack apps.
---
lib/yahns/http_response.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb
index 8965fd0..33ae93e 100644
--- a/lib/yahns/http_response.rb
+++ b/lib/yahns/http_response.rb
@@ -143,7 +143,7 @@ module Yahns::HttpResponse # :nodoc:
buf = "#{response_start}#{status}\r\nDate: #{httpdate}\r\n"
headers.each do |key, value|
case key
- when %r{\ADate\z}
+ when %r{\ADate\z}i
next
when %r{\AContent-Range\z}i
if %r{\Abytes (\d+)-(\d+)/\d+\z} =~ value
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-11-16 4:21 7% [PATCH] http_response: skip Date header case-insensitively Eric Wong
2014-11-16 11:13 5% [ANN] yahns 1.4.0 - minor internal cleanups and bugfixes Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/yahns.git/
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).