http_spew 0.5.0 → 0.6.0

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: 4fd13985e428bbd4458fcc60262b983807ab0a0c
4
- data.tar.gz: d720311ced1ecc3899c10f17a5eef2583dfc6c8e
3
+ metadata.gz: adb45872da4a40e1048b41a9e67d770cf36b8492
4
+ data.tar.gz: 1529513d35f7690108de8fb47e2762222921211a
5
5
  SHA512:
6
- metadata.gz: fb2f4f6f99b181b6e3d6f3e4d4a4bb6a9889dc15a972429c29b712dbb581a3a36a94b59a0af9a5083c8c603d23a50d3c54b4fa0722a4e6db8368ce775f171b16
7
- data.tar.gz: dd46766d426b0f6de9164bd30e0b72492ac355f68bf0293ad0b0b8d94d80aa2c446ae5c7af793366762229fc54f23f93c400a127cf5d0dd5769c448d98ad776e
6
+ metadata.gz: 15d146b1507a22952149368040593afa81b267c9df596a1ba080391cd66917890fe0472d3580644b6111bf3a163c4e5fd8194b0967eb5c92f200f96a12671b69
7
+ data.tar.gz: 8cccbb603644241181634209d8acc42f8b49001e03af46910b41303a12b0b44d70a1e6aee9fa0afbfde644789cd31980236722f098cf3f4b1d7e65a6ceb0cc1f
data/GIT-VERSION-FILE CHANGED
@@ -1 +1 @@
1
- GIT_VERSION = 0.5.0
1
+ GIT_VERSION = 0.6.0
data/GIT-VERSION-GEN CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v0.5.0
4
+ DEF_VER=v0.6.0
5
5
 
6
6
  LF='
7
7
  '
data/LATEST CHANGED
@@ -1,20 +1,15 @@
1
- === http_spew 0.5.0 / 2016-10-31 20:43 UTC
1
+ === http_spew 0.6.0 - even less / 2016-11-05 02:15 UTC
2
2
 
3
- This release requires Ruby 2.1 or later.
3
+ Rack "to_path" support is dropped since few servers can
4
+ take advantage of this in a non-buggy way.
4
5
 
5
- 13 changes since 0.4.1:
6
+ As a consolation, #each should be less GC-intensive by
7
+ with explicit calls to String#clear to reduce memory
8
+ pressure.
6
9
 
7
- gemspec: require kcar >= 0.3.1
8
- test/helper: explicit redirect for Ruby 2.0.0
9
- update packaging + docs (website)
10
- allow all future GPL versions
11
- add benchmark scripts
12
- relax dependency on unicorn
13
- declare empty classes with constant assignment
14
- test_upload: use object_id to check matches
15
- use frozen string literals for Ruby 2.1+
16
- merge into kcar project and mailing list
17
- dedicated mailing list
18
- rely on opt_str_freeze in more places
19
- use monotonic clock for timing
10
+ 3 changes since 0.5.0
11
+
12
+ pkg.mk: avoid network for "gem install"
13
+ request: drop to_path support
14
+ explicitly clear large buf when it is obviously safe
20
15
 
data/NEWS CHANGED
@@ -1,3 +1,18 @@
1
+ === http_spew 0.6.0 - even less / 2016-11-05 02:15 UTC
2
+
3
+ Rack "to_path" support is dropped since few servers can
4
+ take advantage of this in a non-buggy way.
5
+
6
+ As a consolation, #each should be less GC-intensive by
7
+ with explicit calls to String#clear to reduce memory
8
+ pressure.
9
+
10
+ 3 changes since 0.5.0
11
+
12
+ pkg.mk: avoid network for "gem install"
13
+ request: drop to_path support
14
+ explicitly clear large buf when it is obviously safe
15
+
1
16
  === http_spew 0.5.0 / 2016-10-31 20:43 UTC
2
17
 
3
18
  This release requires Ruby 2.1 or later.
@@ -42,6 +42,7 @@ class HTTP_Spew::ContentMD5
42
42
  digest.update(buf)
43
43
  wr.write(buf << "\r\n".freeze)
44
44
  end while input.read(0x4000, buf)
45
+ buf.clear
45
46
  end
46
47
  if expect_len && expect_len.to_i != @bytes_digested
47
48
  raise HTTP_Spew::LengthError,
@@ -35,6 +35,7 @@ class HTTP_Spew::InputSpray
35
35
  @pipes.delete_if { |rd, wr| write_fail?(rd, wr, buf) }.empty? and
36
36
  raise HTTP_Spew::NoWritersError, "all writers have died", []
37
37
  end
38
+ buf.clear
38
39
  rescue => e
39
40
  @pipes.each { |rd, _| rd.error = e }
40
41
  ensure
@@ -2,8 +2,7 @@
2
2
  # This is the base class actually capable of making a normal HTTP request
3
3
  class HTTP_Spew::Request
4
4
 
5
- # May be called by some Rack servers such as Rainbows! to bypass
6
- # +to_path+ calls and avoid path lookups.
5
+ # May be called by IO.select or for use with IO#wait_*able
7
6
  attr_reader :to_io
8
7
 
9
8
  # Stores any exception that was raised in another thread (e.g.
@@ -39,7 +38,7 @@ class HTTP_Spew::Request
39
38
  def resume
40
39
  if @buf
41
40
  case rv = @to_io.kgio_trywrite(@buf)
42
- when String
41
+ when String # unlikely
43
42
  @buf = rv # loop retry, socket buffer could've expanded
44
43
  when Symbol
45
44
  return rv
@@ -61,6 +60,7 @@ class HTTP_Spew::Request
61
60
  if @input
62
61
  @to_io.write(buf) while @input.read(0x4000, buf)
63
62
  end
63
+ buf.clear
64
64
  timeout -= (Process.clock_gettime(Process::CLOCK_MONOTONIC) - t0)
65
65
  while :wait_readable == (rv = read_response) && timeout >= 0.0
66
66
  t0 = Process.clock_gettime(Process::CLOCK_MONOTONIC)
@@ -95,12 +95,6 @@ class HTTP_Spew::Request
95
95
  @response = r << self
96
96
  end
97
97
 
98
- # Used by some Rack-compatible servers to optimize transfers
99
- # by using IO.copy_stream
100
- def to_path
101
- "/dev/fd/#{@to_io.fileno}"
102
- end
103
-
104
98
  def too_big! # :nodoc:
105
99
  raise HTTP_Spew::RequestError.new(self), "response headers too large", []
106
100
  end
@@ -111,6 +105,7 @@ class HTTP_Spew::Request
111
105
  while @to_io.kgio_read(0x4000, buf)
112
106
  yield buf
113
107
  end
108
+ buf.clear
114
109
  end
115
110
 
116
111
  # Used internally by various HTTP_Spew elements to report errors
@@ -1,2 +1,2 @@
1
1
  # -*- encoding: binary -*-
2
- HTTP_Spew.const_set :VERSION, "0.5.0".freeze
2
+ HTTP_Spew.const_set :VERSION, "0.6.0".freeze
data/pkg.mk CHANGED
@@ -86,7 +86,7 @@ fix-perms:
86
86
  gem: $(pkggem)
87
87
 
88
88
  install-gem: $(pkggem)
89
- gem install $(CURDIR)/$<
89
+ gem install --local $(CURDIR)/$<
90
90
 
91
91
  $(pkggem): manifest fix-perms
92
92
  gem build $(rfpackage).gemspec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_spew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kcar hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-31 00:00:00.000000000 Z
11
+ date: 2016-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kcar