diff options
author | Eric Wong <e@80x24.org> | 2016-12-29 06:43:49 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-29 06:43:49 +0000 |
commit | 6f35eb68c0b45aa64da442022cda82b7df9194c4 (patch) | |
tree | 91a1f237f373efac52d6c5626da34f137c4b84ae /lib/mogilefs/new_file/common.rb | |
parent | f8ebe8de94c9288caa1096f8fb02eed62a1b770d (diff) | |
download | mogilefs-client-6f35eb68c0b45aa64da442022cda82b7df9194c4.tar.gz |
We do not emit any sort of message on successful 2XX responses, so there's no need to save the actual response after writing.
Diffstat (limited to 'lib/mogilefs/new_file/common.rb')
-rw-r--r-- | lib/mogilefs/new_file/common.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mogilefs/new_file/common.rb b/lib/mogilefs/new_file/common.rb index c102901..44eee69 100644 --- a/lib/mogilefs/new_file/common.rb +++ b/lib/mogilefs/new_file/common.rb @@ -23,7 +23,7 @@ module MogileFS::NewFile::Common start_time = @opts[:start_time] and tout -= MogileFS.now - start_time set_socket_options(sock) case line = sock.timed_read(23, "", tout > 0.0 ? tout : 0) - when %r{^HTTP/\d\.\d\s+(2\d\d)\s} # success! + when %r{^HTTP/\d\.\d\s+(?:2\d\d)\s} # success! when nil raise EmptyResponseError, 'Unable to read response line from server' when %r{^HTTP/\d\.\d\s+(\d+)} |