watobo 0.9.15 → 0.9.16

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,7 +1,15 @@
1
+ Version 0.9.16
2
+ ===
3
+ Fixes
4
+ ---
5
+ **General**
6
+ * double insert of Content-Length header
7
+ * bad markdown format of CHANGELOG
8
+
1
9
  Version 0.9.15
2
- ==
10
+ ===
3
11
  Fixes
4
- --
12
+ ---
5
13
  **General**
6
14
  * improved socket handling
7
15
  * fixed some UTF-8 issues in passive modules
@@ -219,7 +219,7 @@ module Watobo#:nodoc: all
219
219
  else
220
220
  # puts "========== Add Headers"
221
221
 
222
- request.addHeader("Connection", "Close") #if not use_proxy
222
+ request.set_header("Connection", "close") #if not use_proxy
223
223
 
224
224
  data = request.join
225
225
  unless request.has_body?
@@ -602,7 +602,7 @@ end
602
602
  #auth_request.removeHeader("Authorization")
603
603
  #auth_request.removeHeader("Connection")
604
604
 
605
- auth_request.set_header("Connection", "Close")
605
+ auth_request.set_header("Connection", "close")
606
606
 
607
607
  msg = "NTLM " + t3.encode64
608
608
  auth_request.addHeader("Authorization", msg)
@@ -365,20 +365,21 @@ module Watobo#:nodoc: all
365
365
  def set_header(header, value)
366
366
  begin
367
367
  new_header = "#{header}: #{value}\r\n"
368
- self.each_with_index do |h, i|
369
- if h =~ /^#{Regexp.quote(header)}:/i
370
- h.replace(new_header)
371
- return true
372
- end
373
- if h.strip.empty? or i == self.length-1
374
- self.insert(i, new_header)
375
- return true
368
+ self.each_with_index do |h, i|
369
+ if h =~ /^#{Regexp.quote(header)}:/i
370
+ h.replace(new_header)
371
+ return true
372
+ end
373
+
374
+ if h.strip.empty? or i == self.length-1
375
+ self.insert(i, new_header)
376
+ return true
377
+ end
376
378
  end
377
- end
378
379
  rescue => bang
379
380
  puts bang
380
381
  end
381
- return false
382
+ return false
382
383
  end
383
384
 
384
385
  # sets post data
data/lib/watobo.rb CHANGED
@@ -64,7 +64,7 @@ dont_know_why_REQUIRE_hangs = Mechanize.new
64
64
  # @private
65
65
  module Watobo#:nodoc: all #:nodoc: all
66
66
 
67
- VERSION = "0.9.15"
67
+ VERSION = "0.9.16"
68
68
 
69
69
  def self.base_directory
70
70
  @base_directory ||= ""
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watobo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.15
4
+ version: 0.9.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: