falcon 0.47.7 → 0.47.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bin/falcon +1 -0
- data/bin/falcon-host +1 -0
- data/lib/falcon/command/paths.rb +1 -1
- data/lib/falcon/environment/supervisor.rb +2 -0
- data/lib/falcon/middleware/proxy.rb +6 -3
- data/lib/falcon/proxy_endpoint.rb +1 -1
- data/lib/falcon/rackup/handler.rb +1 -1
- data/lib/falcon/service/supervisor.rb +16 -1
- data/lib/falcon/version.rb +1 -1
- data/lib/rack/handler/falcon.rb +2 -1
- data/lib/rackup/handler/falcon.rb +1 -1
- data/license.md +2 -0
- data/readme.md +12 -4
- data/releases.md +5 -0
- data.tar.gz.sig +0 -0
- metadata +6 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62d903fdc0bb50c3d76ee6091a0b142f18e112f93faf5de63f3f5879e4a19187
|
4
|
+
data.tar.gz: 95f81fd5c9dd1525b0d87fdb18d63d46dcfd230fdbc4f2e2aa8ae4cdce298753
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a94919d62d6a84416b52d7678bba3bd68e795377e07149b5f2a612cbd1afae98e1e4cfe1a8ad8fb786204d51518042ebb6c58e3130a5df524275bc95da90d9fe
|
7
|
+
data.tar.gz: 45d482bb25b531d9869d8641c36974943747c56c885d115a73234dcbccbd23ce1b42c62a35ecb648d7a6f325b69ebc9cb723d38c0053a6395de087e38d4e4fc3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bin/falcon
CHANGED
data/bin/falcon-host
CHANGED
data/lib/falcon/command/paths.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2018-
|
4
|
+
# Copyright, 2018-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
require 'async/http/client'
|
7
7
|
require 'protocol/http/headers'
|
8
8
|
require 'protocol/http/middleware'
|
9
9
|
|
10
|
+
require 'console/event/failure'
|
11
|
+
|
10
12
|
module Falcon
|
11
13
|
module Middleware
|
12
14
|
# A static middleware which always returns a 400 bad request response.
|
@@ -95,7 +97,7 @@ module Falcon
|
|
95
97
|
def prepare_request(request, host)
|
96
98
|
forwarded = []
|
97
99
|
|
98
|
-
Console.
|
100
|
+
Console.debug(self) do |buffer|
|
99
101
|
buffer.puts "Request authority: #{request.authority}"
|
100
102
|
buffer.puts "Host authority: #{host.authority}"
|
101
103
|
buffer.puts "Request: #{request.method} #{request.path} #{request.version}"
|
@@ -136,12 +138,13 @@ module Falcon
|
|
136
138
|
|
137
139
|
client = connect(host.endpoint)
|
138
140
|
|
141
|
+
Console.debug(self, "Sending request...", host: host, request: request, count: @count)
|
139
142
|
client.call(request)
|
140
143
|
else
|
141
144
|
super
|
142
145
|
end
|
143
146
|
rescue => error
|
144
|
-
Console.error(self
|
147
|
+
Console::Event::Failure.for(error).emit(self)
|
145
148
|
return Protocol::HTTP::Response[502, {'content-type' => 'text/plain'}, [error.class.name]]
|
146
149
|
end
|
147
150
|
end
|
@@ -8,6 +8,9 @@ require 'json'
|
|
8
8
|
|
9
9
|
require 'async/service/generic'
|
10
10
|
|
11
|
+
require 'io/endpoint/bound_endpoint'
|
12
|
+
require 'io/stream'
|
13
|
+
|
11
14
|
module Falcon
|
12
15
|
module Service
|
13
16
|
# Implements a host supervisor which can restart the host services and provide various metrics about the running processes.
|
@@ -69,7 +72,7 @@ module Falcon
|
|
69
72
|
container.run(name: self.name, restart: true, count: 1) do |instance|
|
70
73
|
Async do
|
71
74
|
@bound_endpoint.accept do |peer|
|
72
|
-
stream = ::IO::Stream
|
75
|
+
stream = ::IO::Stream(peer)
|
73
76
|
|
74
77
|
while message = stream.gets("\0")
|
75
78
|
response = handle(JSON.parse(message, symbolize_names: true))
|
@@ -91,6 +94,18 @@ module Falcon
|
|
91
94
|
|
92
95
|
super
|
93
96
|
end
|
97
|
+
|
98
|
+
def invoke(command)
|
99
|
+
@bound_endpoint.local_address_endpoint.connect do |peer|
|
100
|
+
stream = ::IO::Stream(peer)
|
101
|
+
|
102
|
+
stream.puts(command.to_json, separator: "\0")
|
103
|
+
|
104
|
+
response = JSON.parse(stream.gets("\0"), symbolize_names: true)
|
105
|
+
|
106
|
+
return response
|
107
|
+
end
|
108
|
+
end
|
94
109
|
end
|
95
110
|
end
|
96
111
|
end
|
data/lib/falcon/version.rb
CHANGED
data/lib/rack/handler/falcon.rb
CHANGED
data/license.md
CHANGED
@@ -21,6 +21,8 @@ Copyright, 2024, by Peter Schrammel.
|
|
21
21
|
Copyright, 2024, by Santiago Bartesaghi.
|
22
22
|
Copyright, 2024, by Trevor Turk.
|
23
23
|
Copyright, 2024, by dependabot[bot].
|
24
|
+
Copyright, 2024, by Adam Daniels.
|
25
|
+
Copyright, 2024, by Stefan Buhrmester.
|
24
26
|
|
25
27
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
26
28
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ![Falcon](logo.
|
1
|
+
# ![Falcon](assets/logo.webp)
|
2
2
|
|
3
3
|
Falcon is a multi-process, multi-fiber rack-compatible HTTP server built on top of [async](https://github.com/socketry/async), [async-container](https://github.com/socketry/async-container) and [async-http](https://github.com/socketry/async-http). Each request is executed within a lightweight fiber and can block on up-stream requests without stalling the entire server process. Falcon supports HTTP/1 and HTTP/2 natively.
|
4
4
|
|
@@ -41,6 +41,14 @@ Please see the [project documentation](https://socketry.github.io/falcon/) for m
|
|
41
41
|
|
42
42
|
- [How It Works](https://socketry.github.io/falcon/guides/how-it-works/index) - This guide gives an overview of how Falcon handles an incoming web request.
|
43
43
|
|
44
|
+
## Releases
|
45
|
+
|
46
|
+
Please see the [project releases](https://socketry.github.io/falcon/releases/index) for all releases.
|
47
|
+
|
48
|
+
### v0.47.8
|
49
|
+
|
50
|
+
- Fix Falcon Supervisor implementation: due to invalid code, it was unable to start.
|
51
|
+
|
44
52
|
## Contributing
|
45
53
|
|
46
54
|
We welcome contributions to this project.
|
@@ -53,8 +61,8 @@ We welcome contributions to this project.
|
|
53
61
|
|
54
62
|
### Developer Certificate of Origin
|
55
63
|
|
56
|
-
|
64
|
+
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
|
57
65
|
|
58
|
-
###
|
66
|
+
### Community Guidelines
|
59
67
|
|
60
|
-
This project is
|
68
|
+
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
|
data/releases.md
ADDED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falcon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.47.
|
4
|
+
version: 0.47.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -11,7 +11,9 @@ authors:
|
|
11
11
|
- Claudiu Garba
|
12
12
|
- Kyle Tam
|
13
13
|
- Mitsutaka Mimura
|
14
|
+
- Peter Schrammel
|
14
15
|
- Sho Ito
|
16
|
+
- Adam Daniels
|
15
17
|
- Colby Swandale
|
16
18
|
- Daniel Evans
|
17
19
|
- Kent Gruber
|
@@ -19,9 +21,9 @@ authors:
|
|
19
21
|
- Mikel Kew
|
20
22
|
- Nick Janetakis
|
21
23
|
- Olle Jonsson
|
22
|
-
- Peter Schrammel
|
23
24
|
- Santiago Bartesaghi
|
24
25
|
- Sh Lin
|
26
|
+
- Stefan Buhrmester
|
25
27
|
- Tad Thorley
|
26
28
|
- Tasos Latsas
|
27
29
|
- dependabot[bot]
|
@@ -57,7 +59,7 @@ cert_chain:
|
|
57
59
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
58
60
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
59
61
|
-----END CERTIFICATE-----
|
60
|
-
date: 2024-
|
62
|
+
date: 2024-08-26 00:00:00.000000000 Z
|
61
63
|
dependencies:
|
62
64
|
- !ruby/object:Gem::Dependency
|
63
65
|
name: async
|
@@ -272,6 +274,7 @@ files:
|
|
272
274
|
- lib/rackup/handler/falcon.rb
|
273
275
|
- license.md
|
274
276
|
- readme.md
|
277
|
+
- releases.md
|
275
278
|
homepage: https://github.com/socketry/falcon
|
276
279
|
licenses:
|
277
280
|
- MIT
|
metadata.gz.sig
CHANGED
Binary file
|