lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] socket-based HTTP server


From: Marco Lazzaroni
Subject: [lwip-users] socket-based HTTP server
Date: Wed, 1 Apr 2020 09:40:57 +0200

Hi all,
sorry for such a basic question. I've developed an application based on the raw API, then I had to integrate an RTOS and I had to switch to a socket based API.
To my understanding, the raw API based http server is run by code in lwip/src/apps/http/httpd.c.
For the socket API, I started from lwip/contrib/apps/httpserver/httpserver-netconn.c and I wrote httpserver-socket.c making some obvious changes.
Well, it works and it's quite stable, but now I need to implement CGI / SSI functionality in order to show the value of some variables.  I also need to import HTTP POST functionality that already worked with the raw API.
I suppose that the code in httpd.c is not directly usable because it is for the raw API (correct?).
I'm starting porting it to socket version by hand; i.e. I'm taking some pieces of http_parse_request() in order to parse the HTTP request, to get the URI, the HTTP/1.1 (or 0.9) string and so on.
Anyway I'm asking myself if I have searched enough: is there something I can reuse for my purposes in the lwip tree? Or even outside it, being the socket API a standard, is there something reusable for an embedded web server?
Thank you for your help.
Best regards,
  Marco

reply via email to

[Prev in Thread] Current Thread [Next in Thread]