net_dav 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/net/dav.rb +3 -2
  3. data/net_dav.gemspec +2 -2
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/lib/net/dav.rb CHANGED
@@ -129,7 +129,8 @@ module Net #:nodoc:
129
129
  response = nil
130
130
  if block
131
131
  @http.request(req) {|res|
132
- res.read_body nil, &block
132
+ # Only start returning a body if we will not retry
133
+ res.read_body nil, &block if !res.is_a?(Net::HTTPUnauthorized) && !res.is_a?(Net::HTTPRedirection)
133
134
  response = res
134
135
  }
135
136
  else
@@ -156,7 +157,7 @@ module Net #:nodoc:
156
157
  if (@uri.scheme != location.scheme ||
157
158
  @uri.host != location.host ||
158
159
  @uri.port != location.port)
159
- raise "cannot redirect to a different host #{@uri} => #{location}"
160
+ raise ArgumentError, "cannot redirect to a different host #{@uri} => #{location}"
160
161
  end
161
162
  new_req = clone_req(location.path, req, headers)
162
163
  return handle_request(new_req, headers, limit - 1, &block)
data/net_dav.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{net_dav}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Miron Cuperman"]
12
- s.date = %q{2009-11-02}
12
+ s.date = %q{2009-11-04}
13
13
  s.default_executable = %q{dav}
14
14
  s.description = %q{WebDAV client library in the style of Net::HTTP}
15
15
  s.email = %q{c1.github@niftybox.net}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net_dav
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miron Cuperman
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-02 00:00:00 -08:00
12
+ date: 2009-11-04 00:00:00 -08:00
13
13
  default_executable: dav
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency