Skip to main content
Senior
November 20, 2018
Question

HTTP Server with dynamic headers (TCP_WRITE_FLAG_COPY)

  • November 20, 2018
  • 2 replies
  • 1130 views

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!

This topic has been closed for replies.

2 replies

FSuar.1078
Visitor II
November 12, 2019

Hi, I have the same problem.

Did you find a solution?

PeagaAuthor
Senior
November 12, 2019

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.