FreeRTOS + TCP content length
I find that most browsers won’t finalize with the lab’s FreeRTOSHTTPserver.c as written.
It needs a “Content-Length: 0rn” or similar in prvSendReply.
FreeRTOS + TCP content length
There was a patch like this:
~~~
if( pxClient->pxFileHandle == NULL )
{
+ strcpy( pxClient->pxParent->pcExtraContents, “Content-Length: 0rn” );
/* “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.