-
-
Notifications
You must be signed in to change notification settings - Fork 14
Added cgi #10
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
Added cgi #10
Conversation
src/cgi.h
Outdated
/* | ||
* Copyright (c) 2023 Gerhard Schiller ([email protected]) | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
* https://www.gnu.org/licenses/gpl-3.0.txt | ||
* | ||
* This code is based on parts of the file: "LwIP/LwIP_HTTP_Server_Raw/Src/httpd_cg_ssi.c" | ||
* | ||
* | ||
* For details see the copyright notice below. | ||
* | ||
* Note: this STMicroelectronics software component has no LICENSE file | ||
* in its root directory. | ||
* | ||
*/ | ||
|
||
|
||
/** | ||
****************************************************************************** | ||
* @file LwIP/LwIP_HTTP_Server_Raw/Src/httpd_cg_ssi.c | ||
* @author MCD Application Team | ||
* @brief Webserver SSI and CGI handlers | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* Copyright (c) 2017 STMicroelectronics. | ||
* All rights reserved. | ||
* | ||
* This software is licensed under terms that can be found in the LICENSE file | ||
* in the root directory of this software component. | ||
* If no LICENSE file comes with this software, it is provided AS-IS. | ||
* | ||
****************************************************************************** | ||
*/ |
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.
I'm not really in favor of adding the file with a specific author name and a different license. What if me or someone else wants to modify/extend it later? It makes maintenance far more complex. There is a common LICENSE file in the root of this repository (it's MIT though).
If you're worried about the STMicroelectronics copyright, why not derive the example implementation from the lwIP example like the other examples in this repository?
https://github.com/lwip-tcpip/lwip/blob/master/contrib/examples/httpd/cgi_example
src/main.cpp
Outdated
#include "ssi.h" | ||
|
||
void run_server() { | ||
httpd_init(); | ||
ssi_init(); | ||
cgi_init(); |
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.
nit-pick: please fix the indent here
cgi_init(); | |
cgi_init(); |
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.
Other than two small suggestions, it looks good to me.
(You can apply those suggestions using Github)
|
||
#kate backups | ||
*~ | ||
|
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.
I think that was added by mistake
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.
Nevermind, I didn't realize that Kate was an editor 😅
I believe it is done now. |
Looks great, thanks for this! 😄 |
Hi Chris!
Here is the added code.
Beside the added functionality I had to make some minor changes to make it compile on my system (Debian 11):
in file ./CmakeList.txt: I changed the required cmake version to 3.18,
in file ./src/CmakeList.txt: I had to comment out the line COMMAND_ERROR_IS_FATAL ANY
To make better use of the pico-probe programmer I changed "pico_enable_stdio_uart" to "true" in ./src/CmakeList.txt
I also took the liberty to "improve" your web pages...
Change that back, if you think it's not a good idea ;-)
Gerhard