cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Server with dynamic headers (TCP_WRITE_FLAG_COPY)

Pedro3
Senior

Hello there!

I'm working with Nucleo-H743ZI and LwIP stack, generated by CubeMX, and I've enabled HTTPD routine for a simple webserver (further I'll add some POST commands). Everything works ok if LWIP_HTTPD_DYNAMIC_HEADERS is disabled. When enabled (removing headers from fsdata), the page doesn't load at all. After some debug process, I noticed that "http_write" method from "http_send_headers" only works if "apiflags = TCP_WRITE_FLAG_COPY". A "0" value or even "TCP_WRITE_FLAG_MORE" doesn't work (no packages on Wireshark). The problem using copy flag is the page became very slow and instable (on Wireshark, each header has a "PSH" flag).

Is anyone there facing the same problem?

Thanks a lot!

2 REPLIES 2
FSuar.1078
Associate

Hi, I have the same problem.

Did you find a solution?

Hello, I'm sorry not posting a solution before...

I'm using TCP_WRITE_FLAG_COPY for all tcp_write operation and increasing MEM_SIZE defined value solved the "slow and instable" issue.