[Top][All Lists]

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

Re: [lwip-devel] DEFAULT_404_HTML: I think it doesn't work

From: address@hidden
Subject: Re: [lwip-devel] DEFAULT_404_HTML: I think it doesn't work
Date: Mon, 13 Nov 2017 21:05:16 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Thanks for reporting, I just fixed that.


Giuseppe Modugno wrote:
I don't use a custom 404 html file, so httpd tries to use a default body
defined as DEFAULT_404_HTML macro. I understood it is treated as a
special case header, because it is added to the dynamic headers.

However I don't think this works well. In http_send_headers():

    if ((hs->hdr_index >= NUM_FILE_HDR_STRINGS) && (hs->file == NULL)) {
      /* When we are at the end of the headers, check for data to send
       * instead of waiting for ACK from remote side to continue
       * (which would happen when sending files from async read). */
      if(http_check_eof(pcb, hs)) {
        data_to_send = HTTP_DATA_TO_SEND_CONTINUE;

and in http_check_eof(), because hs->handle==NULL, the pcb is freed.
After that, hs is referenced again, but it doesn't exist anymore.

lwip-devel mailing list

reply via email to

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