lwip-devel
[Top][All Lists]
Advanced

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

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


From: Giuseppe Modugno
Subject: [lwip-devel] DEFAULT_404_HTML: I think it doesn't work
Date: Mon, 13 Nov 2017 10:56:11 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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.





reply via email to

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