mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-10 18:29:27 +00:00
httpd: use better default values: support HTTP request in up to 5 pbufs by default
This commit is contained in:
parent
59c83ef10e
commit
3af14514dd
|
@ -163,14 +163,14 @@
|
||||||
|
|
||||||
/** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */
|
/** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */
|
||||||
#ifndef LWIP_HTTPD_SUPPORT_REQUESTLIST
|
#ifndef LWIP_HTTPD_SUPPORT_REQUESTLIST
|
||||||
#define LWIP_HTTPD_SUPPORT_REQUESTLIST 0
|
#define LWIP_HTTPD_SUPPORT_REQUESTLIST 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LWIP_HTTPD_SUPPORT_REQUESTLIST
|
#if LWIP_HTTPD_SUPPORT_REQUESTLIST
|
||||||
/** Number of rx pbufs to enqueue to parse an incoming request (up to the first
|
/** Number of rx pbufs to enqueue to parse an incoming request (up to the first
|
||||||
newline) */
|
newline) */
|
||||||
#ifndef LWIP_HTTPD_REQ_QUEUELEN
|
#ifndef LWIP_HTTPD_REQ_QUEUELEN
|
||||||
#define LWIP_HTTPD_REQ_QUEUELEN 10
|
#define LWIP_HTTPD_REQ_QUEUELEN 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming
|
/** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
copied from pbuf into this a global buffer when pbuf- or packet-queues
|
copied from pbuf into this a global buffer when pbuf- or packet-queues
|
||||||
are received - otherwise the input pbuf is used directly) */
|
are received - otherwise the input pbuf is used directly) */
|
||||||
#ifndef LWIP_HTTPD_MAX_REQ_LENGTH
|
#ifndef LWIP_HTTPD_MAX_REQ_LENGTH
|
||||||
#define LWIP_HTTPD_MAX_REQ_LENGTH 1023
|
#define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE))
|
||||||
#endif
|
#endif
|
||||||
#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
|
#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
|
||||||
|
|
||||||
|
@ -1124,7 +1124,7 @@ http_send_data_nonssi(struct tcp_pcb *pcb, struct http_state *hs)
|
||||||
LWIP_ASSERT("hs->left did not fit into u16_t!", (len == hs->left));
|
LWIP_ASSERT("hs->left did not fit into u16_t!", (len == hs->left));
|
||||||
}
|
}
|
||||||
mss = tcp_mss(pcb);
|
mss = tcp_mss(pcb);
|
||||||
if(len > (2 * mss)) {
|
if (len > (2 * mss)) {
|
||||||
len = 2 * mss;
|
len = 2 * mss;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user