falcon 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +49 -0
- data/lib/falcon/command/serve.rb +8 -2
- data/lib/falcon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fecfaa691ad0c6d92496dff1a282642d20c98328d56f73499271134bfbbb086f
|
4
|
+
data.tar.gz: b0bfaf290fca3958944027d225e5e620ace8d98d52d2c2ffffb0679c277500d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e7d2726626b8d0302272861c676d3e5e8ca750fad87de95a1aa02900a9aaac4372b441d7cbb140cd28568aa1b998b84f8d2e409e81fa2cc88a80f6eb6974b77
|
7
|
+
data.tar.gz: 2ff4f1474e398a4f4b07d0d5bb7aeebf69b8eab2dc7d874e3ee83aa31881583c7776376f714d6e74500c535450cb6717a83f675aeb156ef7b2b8bc2dd615a8c4
|
data/README.md
CHANGED
@@ -139,6 +139,55 @@ You can invoke Falcon via `rackup`:
|
|
139
139
|
|
140
140
|
This will run a single-threaded instance of Falcon using `http/1`. While it works fine, it's not recommended to use `rackup` with `falcon`, because performance will be limited.
|
141
141
|
|
142
|
+
### Self-Signed TLS with Curl
|
143
|
+
|
144
|
+
In order to use `curl` with self-signed localhost certificates, you need to specify `--insecure` or the path of the certificate to validate the request:
|
145
|
+
|
146
|
+
```
|
147
|
+
> curl -v https://localhost:9292 --cacert ~/.localhost/localhost.crt
|
148
|
+
* Trying ::1...
|
149
|
+
* TCP_NODELAY set
|
150
|
+
* Connected to localhost (::1) port 9292 (#0)
|
151
|
+
* ALPN, offering http/1.1
|
152
|
+
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
|
153
|
+
* successfully set certificate verify locations:
|
154
|
+
* CAfile: /Users/samuel/.localhost/localhost.crt
|
155
|
+
CApath: none
|
156
|
+
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
|
157
|
+
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
|
158
|
+
* TLSv1.2 (IN), TLS handshake, Server hello (2):
|
159
|
+
* TLSv1.2 (IN), TLS handshake, Certificate (11):
|
160
|
+
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
|
161
|
+
* TLSv1.2 (IN), TLS handshake, Request CERT (13):
|
162
|
+
* TLSv1.2 (IN), TLS handshake, Server finished (14):
|
163
|
+
* TLSv1.2 (OUT), TLS handshake, Certificate (11):
|
164
|
+
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
|
165
|
+
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
|
166
|
+
* TLSv1.2 (OUT), TLS handshake, Finished (20):
|
167
|
+
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
|
168
|
+
* TLSv1.2 (IN), TLS handshake, Finished (20):
|
169
|
+
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
|
170
|
+
* ALPN, server accepted to use http/1.1
|
171
|
+
* Server certificate:
|
172
|
+
* subject: O=Development/CN=localhost
|
173
|
+
* start date: Aug 10 00:31:43 2018 GMT
|
174
|
+
* expire date: Aug 7 00:31:43 2028 GMT
|
175
|
+
* subjectAltName: host "localhost" matched cert's "localhost"
|
176
|
+
* issuer: O=Development/CN=localhost
|
177
|
+
* SSL certificate verify ok.
|
178
|
+
> GET / HTTP/1.1
|
179
|
+
> Host: localhost:9292
|
180
|
+
> User-Agent: curl/7.63.0
|
181
|
+
> Accept: */*
|
182
|
+
>
|
183
|
+
< HTTP/1.1 301
|
184
|
+
< location: /index
|
185
|
+
< cache-control: max-age=86400
|
186
|
+
< content-length: 0
|
187
|
+
<
|
188
|
+
* Connection #0 to host localhost left intact
|
189
|
+
```
|
190
|
+
|
142
191
|
## Performance
|
143
192
|
|
144
193
|
Falcon uses an asynchronous event-driven reactor to provide non-blocking IO. It can handle an arbitrary number of in-flight requests with minimal overhead per request.
|
data/lib/falcon/command/serve.rb
CHANGED
@@ -44,6 +44,8 @@ module Falcon
|
|
44
44
|
option '-h/--hostname <hostname>', "Specify the hostname which would be used for certificates, etc."
|
45
45
|
option '-t/--timeout <duration>', "Specify the maximum time to wait for blocking operations.", type: Float, default: 60
|
46
46
|
|
47
|
+
option '--reuse-port', "Enable SO_REUSEPORT if possible.", default: false
|
48
|
+
|
47
49
|
option '-c/--config <path>', "Rackup configuration file to load", default: 'config.ru'
|
48
50
|
option '-n/--concurrency <count>', "Number of processes to start", default: Async::Container.hardware_concurrency, type: Integer
|
49
51
|
|
@@ -71,14 +73,18 @@ module Falcon
|
|
71
73
|
# Oh, for Hash#slice(keys...)
|
72
74
|
options = {}
|
73
75
|
|
74
|
-
if @options
|
76
|
+
if @options.key? :hostname
|
75
77
|
options[:hostname] = @options[:hostname]
|
76
78
|
end
|
77
79
|
|
78
|
-
if @options
|
80
|
+
if @options.key? :port
|
79
81
|
options[:port] = @options[:port]
|
80
82
|
end
|
81
83
|
|
84
|
+
if @options.key? :reuse_port
|
85
|
+
options[:reuse_port] = @options[:reuse_port]
|
86
|
+
end
|
87
|
+
|
82
88
|
if duration = @options[:timeout] and !duration.zero?
|
83
89
|
options[:timeout] = duration
|
84
90
|
end
|
data/lib/falcon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falcon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-protocol
|