Skip to content

Conversation

Gerhard-Vienna
Copy link
Contributor

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

src/cgi.h Outdated
Comment on lines 1 to 33
/*
* 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.
*
******************************************************************************
*/
Copy link
Owner

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();
Copy link
Owner

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

Suggested change
cgi_init();
cgi_init();

Copy link
Owner

@krzmaz krzmaz left a 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)

Comment on lines +9 to +12

#kate backups
*~

Copy link
Owner

@krzmaz krzmaz Jan 12, 2023

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

Copy link
Owner

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 😅

@Gerhard-Vienna
Copy link
Contributor Author

I believe it is done now.
If you want anything changed, let me know.

@krzmaz
Copy link
Owner

krzmaz commented Jan 14, 2023

Looks great, thanks for this! 😄

@krzmaz krzmaz merged commit 2fcb9a0 into krzmaz:main Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants