httparty 0.15.2 → 0.15.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of httparty might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e097df20b755de18665bb5686f22e118f173d8b
4
- data.tar.gz: 646ab7799491047f49bc27bf3bb61253c283559a
3
+ metadata.gz: 79fe2cddc91ec18f47159ed37d6f30b7a87b12ca
4
+ data.tar.gz: 6cbcf133a62890a8ce58667478b7c1f3e5a449fb
5
5
  SHA512:
6
- metadata.gz: 95e5110618bc2080089e80a7dce351fdb5ae386cf60cd6eecaa5fbcd396d88e8999d03ec97c594c4abbd12fb665782a73ad38aa0c5569caa1a82f1d1aee6386c
7
- data.tar.gz: 5fe739347495957a1301a7ce798947578d88133c615c18fec86d7aa339a436cd4ef3cbde773b9de3f0f9d575f1abefdd7de26ecc0e542750a2ef2a90ae492ce8
6
+ metadata.gz: 38a54d1d643875d108d1f77f3d7d6a8f1132eec84048e3eed2f44dacec6b5aeea360581496dc22c3d3d4cea375c4616cd51cf4e68e8f317f482ce1120e151424
7
+ data.tar.gz: 0200edc00c38b810a16dd5ff25bd5342d941fd7f6b38df2308414ad5dc16249fa79a013fe307e0496951ec07069e554c99fb50ff554669532bc158e0ef64cc4e
@@ -1,3 +1,10 @@
1
+ ## 0.15.3
2
+
3
+ Fixed
4
+
5
+ * [Fix processing nil body for HEAD requests](https://github.com/jnunemaker/httparty/pull/530).
6
+ * Add missing require to headers.rb (33439a8).
7
+
1
8
  ## 0.15.2
2
9
 
3
10
  Fixed
@@ -276,7 +276,7 @@ module HTTParty
276
276
  end
277
277
 
278
278
  def encode_with_ruby_encoding(body, charset)
279
- if Encoding.name_list.include?(charset)
279
+ if !body.nil? && Encoding.name_list.include?(charset)
280
280
  body.force_encoding(charset)
281
281
  else
282
282
  body
@@ -1,3 +1,5 @@
1
+ require 'delegate'
2
+
1
3
  module HTTParty
2
4
  class Response #:nodoc:
3
5
  class Headers < ::SimpleDelegator
@@ -1,3 +1,3 @@
1
1
  module HTTParty
2
- VERSION = "0.15.2"
2
+ VERSION = "0.15.3"
3
3
  end
@@ -485,6 +485,13 @@ RSpec.describe HTTParty::Request do
485
485
  expect(resp.body.encoding).to eq(Encoding.find("UTF-8"))
486
486
  end
487
487
 
488
+ it "should process response with a nil body" do
489
+ response = stub_response nil
490
+ response.initialize_http_header("Content-Type" => "text/html;charset=UTF-8")
491
+ resp = @request.perform
492
+ expect(resp.body).to be_nil
493
+ end
494
+
488
495
  it "should process utf-16 charset with little endian bom correctly" do
489
496
  @request.options[:assume_utf16_is_big_endian] = true
490
497
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httparty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-12 00:00:00.000000000 Z
12
+ date: 2017-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_xml
@@ -39,9 +39,9 @@ files:
39
39
  - ".simplecov"
40
40
  - ".travis.yml"
41
41
  - CONTRIBUTING.md
42
+ - Changelog.md
42
43
  - Gemfile
43
44
  - Guardfile
44
- - History.md
45
45
  - MIT-LICENSE
46
46
  - README.md
47
47
  - Rakefile