rhebok 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/Changes +6 -0
- data/ext/rhebok/rhebok.c +11 -11
- data/lib/rhebok/version.rb +1 -1
- data/rhebok.gemspec +2 -2
- data/test/testrequest.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af16d4fa2ab9899851800cf75b3d16c5143435d4
|
4
|
+
data.tar.gz: 08c761f99f0b0e9993c804c8598ec77284ca9bb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60b6eb3edc8a8cc6e0792a4d2448f779ad2ffe8c51b6d39c2542ae999d0db5ce81402faf6dde1752f0eee14c7c82fab1f0f00d797282058638d413c15d5fa7d9
|
7
|
+
data.tar.gz: fb8e2129867eaa88a2dea1c598a3c0aecdfb2c711480e7edeaefe02c0cc2151cc3b8544303cd8459a5f7e23f95d71e727f1af18570ef88e78a262f99d1576bcc
|
data/.travis.yml
CHANGED
data/Changes
CHANGED
data/ext/rhebok/rhebok.c
CHANGED
@@ -325,7 +325,7 @@ ssize_t _writev_timeout(const int fileno, const double timeout, struct iovec *io
|
|
325
325
|
while (1) {
|
326
326
|
wfds[0].fd = fileno;
|
327
327
|
wfds[0].events = POLLOUT;
|
328
|
-
nfound = poll(wfds, 1, (int)timeout*1000);
|
328
|
+
nfound = poll(wfds, 1, (int)(timeout*1000));
|
329
329
|
if ( nfound == 1 ) {
|
330
330
|
break;
|
331
331
|
}
|
@@ -353,7 +353,7 @@ ssize_t _read_timeout(const int fileno, const double timeout, char * read_buf, c
|
|
353
353
|
return rv;
|
354
354
|
}
|
355
355
|
while (1) {
|
356
|
-
nfound = poll(rfds, 1, (int)timeout*1000);
|
356
|
+
nfound = poll(rfds, 1, (int)(timeout*1000));
|
357
357
|
if ( nfound == 1 ) {
|
358
358
|
break;
|
359
359
|
}
|
@@ -391,7 +391,7 @@ ssize_t _write_timeout(const int fileno, const double timeout, char * write_buf,
|
|
391
391
|
while (1) {
|
392
392
|
wfds[0].fd = fileno;
|
393
393
|
wfds[0].events = POLLOUT;
|
394
|
-
nfound = poll(wfds, 1, (int)timeout*1000);
|
394
|
+
nfound = poll(wfds, 1, (int)(timeout*1000));
|
395
395
|
if ( nfound == 1 ) {
|
396
396
|
break;
|
397
397
|
}
|
@@ -593,7 +593,7 @@ VALUE rhe_accept(VALUE self, VALUE fileno, VALUE timeoutv, VALUE tcp, VALUE env)
|
|
593
593
|
if ( tcp == Qtrue ) {
|
594
594
|
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(int));
|
595
595
|
rb_hash_aset(env, remote_addr_key, rb_str_new2(inet_ntoa(cliaddr.sin_addr)));
|
596
|
-
rb_hash_aset(env, remote_port_key,
|
596
|
+
rb_hash_aset(env, remote_port_key, rb_fix2str(INT2FIX(ntohs(cliaddr.sin_port)),10));
|
597
597
|
}
|
598
598
|
else {
|
599
599
|
rb_hash_aset(env, remote_addr_key, vacant_string_val);
|
@@ -649,7 +649,7 @@ VALUE rhe_accept(VALUE self, VALUE fileno, VALUE timeoutv, VALUE tcp, VALUE env)
|
|
649
649
|
}
|
650
650
|
|
651
651
|
req = rb_ary_new2(2);
|
652
|
-
rb_ary_push(req,
|
652
|
+
rb_ary_push(req, INT2NUM(fd));
|
653
653
|
rb_ary_push(req, rb_str_new(&read_buf[reqlen],buf_len - reqlen));
|
654
654
|
return req;
|
655
655
|
badexit:
|
@@ -676,7 +676,7 @@ VALUE rhe_read_timeout(VALUE self, VALUE filenov, VALUE rbuf, VALUE lenv, VALUE
|
|
676
676
|
rb_str_cat(rbuf, d, rv);
|
677
677
|
}
|
678
678
|
xfree(d);
|
679
|
-
return
|
679
|
+
return SSIZET2NUM(rv);
|
680
680
|
}
|
681
681
|
|
682
682
|
static
|
@@ -689,7 +689,7 @@ VALUE rhe_write_timeout(VALUE self, VALUE fileno, VALUE buf, VALUE len, VALUE of
|
|
689
689
|
if ( rv < 0 ) {
|
690
690
|
return Qnil;
|
691
691
|
}
|
692
|
-
return
|
692
|
+
return SSIZET2NUM(rv);
|
693
693
|
}
|
694
694
|
|
695
695
|
|
@@ -715,7 +715,7 @@ VALUE rhe_write_all(VALUE self, VALUE fileno, VALUE buf, VALUE offsetv, VALUE ti
|
|
715
715
|
if (rv < 0) {
|
716
716
|
return Qnil;
|
717
717
|
}
|
718
|
-
return
|
718
|
+
return SSIZET2NUM(written);
|
719
719
|
}
|
720
720
|
|
721
721
|
static
|
@@ -733,7 +733,7 @@ VALUE rhe_write_chunk(VALUE self, VALUE fileno, VALUE buf, VALUE offsetv, VALUE
|
|
733
733
|
buf_len = RSTRING_LEN(buf);
|
734
734
|
|
735
735
|
if ( buf_len == 0 ){
|
736
|
-
return
|
736
|
+
return INT2FIX(0);
|
737
737
|
}
|
738
738
|
|
739
739
|
{
|
@@ -773,7 +773,7 @@ VALUE rhe_write_chunk(VALUE self, VALUE fileno, VALUE buf, VALUE offsetv, VALUE
|
|
773
773
|
if ( rv < 0 ) {
|
774
774
|
return Qnil;
|
775
775
|
}
|
776
|
-
return
|
776
|
+
return SSIZET2NUM(written);
|
777
777
|
}
|
778
778
|
|
779
779
|
static
|
@@ -1021,7 +1021,7 @@ VALUE rhe_write_response(VALUE self, VALUE filenov, VALUE timeoutv, VALUE status
|
|
1021
1021
|
if ( rv < 0 ) {
|
1022
1022
|
return Qnil;
|
1023
1023
|
}
|
1024
|
-
return
|
1024
|
+
return SSIZET2NUM(written);
|
1025
1025
|
}
|
1026
1026
|
|
1027
1027
|
void Init_rhebok()
|
data/lib/rhebok/version.rb
CHANGED
data/rhebok.gemspec
CHANGED
@@ -19,12 +19,12 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.required_ruby_version = '>= 2.
|
22
|
+
spec.required_ruby_version = '>= 2.2.2'
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.7"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
25
|
spec.add_development_dependency "bacon"
|
26
26
|
spec.add_dependency "rack"
|
27
|
-
spec.add_dependency "prefork_engine", ">= 0.0.
|
27
|
+
spec.add_dependency "prefork_engine", ">= 0.0.7"
|
28
28
|
|
29
29
|
# get an array of submodule dirs by executing 'pwd' inside each submodule
|
30
30
|
`git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
|
data/test/testrequest.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhebok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Nagano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.0.
|
75
|
+
version: 0.0.7
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.0.
|
82
|
+
version: 0.0.7
|
83
83
|
description: High Performance and Optimized Preforked Rack Handler
|
84
84
|
email:
|
85
85
|
- kazeburo@gmail.com
|
@@ -135,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 2.2.2
|
139
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.5.1
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: High Performance Preforked Rack Handler
|