lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] LWIP_HTTPD_SSI_MULTIPART and concurrent HTTP requests


From: R. Diez
Subject: [lwip-users] LWIP_HTTPD_SSI_MULTIPART and concurrent HTTP requests
Date: Fri, 24 Nov 2017 10:40:06 +0000 (UTC)

Hi all:

I am using the httpd server that comes with lwIP version 2.0.2 on a small embedded device.

As I am generating dynamic HTML content that can reach 1 or 2 KiB per CGI SSI tag, I enabled LWIP_HTTPD_SSI_MULTIPART, so that I can send the tag contents in chunks. Whenever I get an SSI tag callback, I fill a small buffer with the generated contents for that tag, and I give the data back piece by piece on the next callbacks. That is all working fine.

However, I have recently realised that the httpd server can accept and serve multiple connections at the same time. I was not aware of this as the SSI callbacks do not seem to pass any context pointers. I noticed this because some asserts are triggering in my SSI handling logic. For example, say the same web page is requested simultaneously from 2 different browsers. Then my SSI multipart callbacks do not know which page is meant on the current callback. The SSI tag contents can be different per page, think for example about some text that has the current clock time embedded.

Is there any way to make lwIP's httpd server provide some "request context" when processing an SSI tag? Would I know when the context has been destroyed, in order to release the associated SSI multipart buffer?

Or is it possible to make the httpd server accept just 1 connection at a time?

Thanks in advance,
  rdiez


reply via email to

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