nethttputils 0.3.2.8 → 0.3.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bb3ff44508a83e6598792376792f736f878a525
4
- data.tar.gz: 1d7a3335ef9071633325ea342ef627994d0b493d
3
+ metadata.gz: 197097c1a40d4d0d409aa0c9f0965957ee9daf2a
4
+ data.tar.gz: 5f78308fd5162565db7eca00c630fd2c5e39197e
5
5
  SHA512:
6
- metadata.gz: 02dd3b560d3d99c9f653dc09a284fb944443bb934afe4d8da36ba8f7b70b34f9cd5e7662c9c55d04a0651417409663813020d237a498b10fb513e8ca4808fb72
7
- data.tar.gz: ec2b35988efa0e1c44979662827a7f6d5db10a77d6a10307c26f64089f833b42f28ca41fe78ceea34f6b6d10e4c75eedfddb1ec44de93e45422dea78335c9bd6
6
+ metadata.gz: c9275a5dc752288e03877fc8fbbad9fa3b808cca7a7aa463fbb6b7e55c8bc0466cff9c278896a3e7df6084dbca49ea725ab97dbae6dbc465e436e552b9dacedf
7
+ data.tar.gz: f84dbb68971f7aae2c51200e42b95f9492b9b5c1749be2c2bd5870a751a920527d1e93733e77036d629c1cff69b39664243a7cbb39828a88115625362e070282
data/lib/nethttputils.rb CHANGED
@@ -204,7 +204,7 @@ module NetHTTPUtils
204
204
  # TODO: use WEBrick::Cookie
205
205
  old_cookies = cookies.dup
206
206
  response.to_hash.fetch("set-cookie", []).each do |c|
207
- fail "bad cookie? #{c.inspect}" unless /\A([^\s=]+)=([^\s=]*)\z/.match c.split(/\s*;\s*/).first
207
+ fail "bad cookie? #{c.inspect}" unless /\A([^\s=]+)=([^\s]*)\z/.match c.split(/\s*;\s*/).first
208
208
  logger.debug "set-cookie: #{$1}=#{$2}"
209
209
  old_cookies.delete $1
210
210
  cookies.store $1, $2
@@ -361,12 +361,12 @@ if $0 == __FILE__
361
361
  res["location"] = "/2"
362
362
  end
363
363
  server.mount_proc "/2" do |req, res|
364
- res.cookies.push WEBrick::Cookie.new("3", "6")
364
+ res.cookies.push WEBrick::Cookie.new("3", "6=c")
365
365
  res.cookies.push WEBrick::Cookie.new("8", "")
366
366
  res.cookies.push WEBrick::Cookie.new("4", "7")
367
367
  end
368
368
  t = Thread.new{ server.start }
369
- fail unless %w{ 3=6 8= 4=7 1=5 a=b } == p(NetHTTPUtils.request_data("http://localhost:8000/1").
369
+ fail unless %w{ 3=6=c 8= 4=7 1=5 a=b } == p(NetHTTPUtils.request_data("http://localhost:8000/1").
370
370
  instance_variable_get(:@last_response).to_hash.fetch("set-cookie"))
371
371
  server.shutdown
372
372
  t.join
data/nethttputils.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "nethttputils"
3
- spec.version = "0.3.2.8"
3
+ spec.version = "0.3.2.9"
4
4
  spec.summary = "this tool is like a pet that I adopted young and now I depend on, sorry"
5
5
  spec.description = <<-EOF
6
6
  Back in 2015 I was a guy automating things at my job and two scripts had a common need --
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nethttputils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2.8
4
+ version: 0.3.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov aka Nakilon