-
Notifications
You must be signed in to change notification settings - Fork 8.1k
include: net: http: rework http headers #51141
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
include: net: http: rework http headers #51141
Conversation
13439c2
to
201a6eb
Compare
Now there are http include files in two directories. Why not put all the http related files in to same place, either to |
I was aiming to do it gradually - could move everything to |
@stephanosio - looks like the license issue may be a false positive. MIT is permissive, so should be compatible with Apache, unless I'm mistaken. |
It is not a false positive. Integrating any non-Apache 2.0 code requires TSC approval; if approved, the check result can be overridden. https://docs.zephyrproject.org/latest/contribute/external.html#submission-and-review-process |
The code already exists in Zephyr, @cfriedt just moved it to another header and kept the license. I just wonder if we could just mark the license as Apache in the new header, after all it is just some enums we are copying here. |
I'm inclined to go with @jukkar 's suggestion. For what equates to effectively constants, I think it's safe to relicense. |
Previously, HTTP method enumerations were only defined within the `http_parser.h`, which may not be ideal for all use cases. This commit moves the `enum http_method` definition to a dedicated header in a dedicated `http` subdirectory. Signed-off-by: Christopher Friedt <[email protected]>
Add a script to extract HTTP status values and format them in a way that is both human readable and machine parseable. Each line of output is of the form: ``` HTTP_{key}_{upper_val} = {key}, /**< val */ ``` Signed-off-by: Christopher Friedt <[email protected]>
Provide a common header enumerating HTTP response status codes. Signed-off-by: Christopher Friedt <[email protected]>
7c63582
to
7a4d438
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 reasonable. For the latest commit include: net: http: rename http_x.h http/x.h
, it would be great to see the motivation/reasoning why this change in the commit message. Now the commit msg only states the obvious which can be seen also in the actual change.
Some minor housekeeping prior to adding an http server implementation. There are already a number of http headers and that number will likely increase with subsequent work. Moving them into a common directory cleans up the `include/net` directory a bit. Signed-off-by: Christopher Friedt <[email protected]>
7a4d438
to
449e00f
Compare
Some housekeeping to make #46758 slightly easier
enum http_method
to its own header underhttp/
scripts/net/enumerate_http_status.py
enum http_status
in a separate header underhttp/
http/
directory