friesen wrote on Monday, June 11, 2018:
I find that most browsers won’t finalize with the lab’s FreeRTOS_HTTP_server.c as written.
It needs a “Content-Length: 0\r\n” or similar in prvSendReply.
friesen wrote on Monday, June 11, 2018:
I find that most browsers won’t finalize with the lab’s FreeRTOS_HTTP_server.c as written.
It needs a “Content-Length: 0\r\n” or similar in prvSendReply.
heinbali01 wrote on Monday, June 11, 2018:
There was a patch like this:
if( pxClient->pxFileHandle == NULL )
{
+ strcpy( pxClient->pxParent->pcExtraContents, "Content-Length: 0\r\n" );
/* "404 File not found". */
xRc = prvSendReply( pxClient, WEB_NOT_FOUND );
}
else
{
pxClient->uxBytesLeft = ( size_t ) pxClient->pxFileHandle->ulFileSize;
xRc = prvSendFile( pxClient );
}
In other words, the Content-Length
was missing in case a file was not found.
This patch does not yet appear in the latest source release.