-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: http: define http service and resource iterable sections #55430
net: http: define http service and resource iterable sections #55430
Conversation
In draft / blocked on #55429 |
d92d8f1
to
a5f394f
Compare
Also, just to clarify, yes, this does allow multiple HTTP servers to operate simultaneously (or a single server, serving multiple ports). |
a5f394f
to
71b333e
Compare
|
I would say that possibly the most useful result of this change is that it allows us to test or benchmark any HTTP server implementation using the same testsuite |
This is important to get in well before GSoC contributors finish preparing their applications / sample code. |
71b333e
to
2455c07
Compare
3be5979
to
e585a3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks cool, nice work 👍
6ee42b1
to
9617232
Compare
9617232
to
e66d15b
Compare
c76d40e
to
d1fc992
Compare
Provide a means of declaring zero or more HTTP services, each with zero or more static HTTP resources. Static HTTP resources are those which have fixed paths[1] which are known prior to system initialization. Some examples of static http resources would be * a forwarder from '/' to '/index.html' * a REST endpoint with fixed path '/api/foo' and detail pointing at some implementation-specific function * a Javascript file in string form with fixed path '/js/util.js' * a 'construction' image with path '/res/work.png' * a gzip-compressed 'Hello' HTML file at '/hello.html' Without describing in any detail how static HTTP resources are organized or served by any given HTTP server, we can describe what static resources exist on a system in a common way that does not require any optional facilities (e.g. filesystem) and relies only on addressable memory. Additionally, for the purposes of simply allowing others to implement custom HTTP servers in a consistent way, or benchmarking implementations, or having a consistent testsuite to use across multiple implementations, it is helpful to have a common method to declare HTTP services and static resources for Zephyr. [1] https://en.wikipedia.org/wiki/URL Signed-off-by: Chris Friedt <cfriedt@meta.com>
Add tests to verify the newly-added HTTP service and resource macros. Signed-off-by: Chris Friedt <cfriedt@meta.com>
d1fc992
to
5df0df5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Provide a means of declaring zero or more HTTP services, each with zero or more static HTTP resources.
Static HTTP resources are those which have fixed paths[1] that are known prior to system initialization. Some examples of static http resources would be
Without loss of generality in how static HTTP resources are organized or served by any given HTTP server, we can describe what static resources exist on a system in a common way that
Additionally, for the purposes of simply allowing others to implement custom HTTP servers in a consistent way, or benchmarking implementations, or having a consistent testsuite to use across multiple implementations, it is helpful to have a common method to declare HTTP services and static resources for Zephyr.
[1] https://en.wikipedia.org/wiki/URL