[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] httpd fails due to LWIP_HTTPD_REQ_BUFSIZE
From: |
address@hidden |
Subject: |
Re: [lwip-users] httpd fails due to LWIP_HTTPD_REQ_BUFSIZE |
Date: |
Sat, 25 Apr 2020 20:54:59 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
Am 24.04.2020 um 21:02 schrieb hondgm--- via lwip-users:
> I'm using lwip 2.0.3 with httpd and when submitting one of my webpage
> forms (using "type="submit"") the web browser complains lwip/httpd
> didn't send any data.
>
> Upon further investigation, the issue is in httpd.c:
>
> #if LWIP_HTTPD_SUPPORT_REQUESTLIST
> clen = pbuf_clen(hs->req);
> if ((hs->req->tot_len <= LWIP_HTTPD_REQ_BUFSIZE) &&
> (clen <= LWIP_HTTPD_REQ_QUEUELEN)) {
>
>
> hs->req->tot_len is longer than LWIP_HTTPD_REQ_BUFSIZE, which is 1023
> because of:
>
> #define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023,
> (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE))
>
>
> I tried increasing LWIP_HTTPD_MAX_REQ_LENGTH to a higher value, but it
> caused an exception. What is the proper way to deal with this?
Increaseing LWIP_HTTPD_MAX_REQ_LENGTH *is* the proper way to handle
requests that are longer and not sent in one packet.
You'll need to debug the cause of that exception (which is not expected).
Regards,
Simon