Created
August 17, 2009 12:56
-
-
Save ujh/169106 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From dabd97ec82099de266180372fe63b3c9b426f16e Mon Sep 17 00:00:00 2001 | |
From: Urban Hafner <[email protected]> | |
Date: Mon, 17 Aug 2009 14:54:21 +0200 | |
Subject: [PATCH] Remove empty lines that are produced by splitting the cookie string | |
--- | |
lib/rack/test/cookie_jar.rb | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/lib/rack/test/cookie_jar.rb b/lib/rack/test/cookie_jar.rb | |
index d2f3d2b..be3ffd2 100644 | |
--- a/lib/rack/test/cookie_jar.rb | |
+++ b/lib/rack/test/cookie_jar.rb | |
@@ -116,7 +116,7 @@ module Rack | |
def merge(raw_cookies, uri = nil) | |
return unless raw_cookies | |
- Array(raw_cookies).join("\n").split("\n").each do |raw_cookie| | |
+ Array(raw_cookies).join("\n").split("\n").reject {|c| c =~ /^\s*$/}.each do |raw_cookie| | |
cookie = Cookie.new(raw_cookie, uri, @default_host) | |
self << cookie if cookie.valid?(uri) | |
end | |
-- | |
1.6.3.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment