Ruby mogilefs-client dev/users discussion/patches/bugs/help/...
 help / color / Atom feed
* [PATCH] backend: simplify regexp
@ 2015-11-04 21:43 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-11-04 21:43 UTC (permalink / raw)
  To: mogilefs-client-public

We don't care if there's a \r before \n if we anchor on \z.
 lib/mogilefs/backend.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/mogilefs/backend.rb b/lib/mogilefs/backend.rb
index 01203f6..f4d5b1f 100644
--- a/lib/mogilefs/backend.rb
+++ b/lib/mogilefs/backend.rb
@@ -242,7 +242,7 @@ class MogileFS::Backend
         io = dispatch_unlocked(request)
         line = io.timed_gets(@timeout)
-        break if /\r?\n\z/ =~ line
+        break if /\n\z/ =~ line
         line and raise MogileFS::InvalidResponseError,
                        "Invalid response from server: #{line.inspect}"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-04 21:43 [PATCH] backend: simplify regexp Eric Wong

Ruby mogilefs-client dev/users discussion/patches/bugs/help/...

Archives are clonable:
	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/mogilefs-client-public

Example config snippet for mirrors

Newsgroups are available over NNTP:

 note: .onion URLs require Tor:

AGPL code for this site: git clone