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 +4 -4
- data/GIT-VERSION-FILE +1 -1
- data/GIT-VERSION-GEN +1 -1
- data/LATEST +11 -16
- data/NEWS +15 -0
- data/lib/http_spew/content_md5.rb +1 -0
- data/lib/http_spew/input_spray.rb +1 -0
- data/lib/http_spew/request.rb +4 -9
- data/lib/http_spew/version.rb +1 -1
- data/pkg.mk +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb45872da4a40e1048b41a9e67d770cf36b8492
|
4
|
+
data.tar.gz: 1529513d35f7690108de8fb47e2762222921211a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15d146b1507a22952149368040593afa81b267c9df596a1ba080391cd66917890fe0472d3580644b6111bf3a163c4e5fd8194b0967eb5c92f200f96a12671b69
|
7
|
+
data.tar.gz: 8cccbb603644241181634209d8acc42f8b49001e03af46910b41303a12b0b44d70a1e6aee9fa0afbfde644789cd31980236722f098cf3f4b1d7e65a6ceb0cc1f
|
data/GIT-VERSION-FILE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
GIT_VERSION = 0.
|
1
|
+
GIT_VERSION = 0.6.0
|
data/GIT-VERSION-GEN
CHANGED
data/LATEST
CHANGED
@@ -1,20 +1,15 @@
|
|
1
|
-
=== http_spew 0.
|
1
|
+
=== http_spew 0.6.0 - even less / 2016-11-05 02:15 UTC
|
2
2
|
|
3
|
-
|
3
|
+
Rack "to_path" support is dropped since few servers can
|
4
|
+
take advantage of this in a non-buggy way.
|
4
5
|
|
5
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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.
|
data/lib/http_spew/request.rb
CHANGED
@@ -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
|
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
|
data/lib/http_spew/version.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
|
-
HTTP_Spew.const_set :VERSION, "0.
|
2
|
+
HTTP_Spew.const_set :VERSION, "0.6.0".freeze
|
data/pkg.mk
CHANGED
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.
|
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-
|
11
|
+
date: 2016-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kcar
|