Description
Summary
In a webserver, in http_server_http1.c, in handle_http1_static_fs_resource
:
STATIC_FS_RESPONSE_SIZE
is calculated as a minimum amount of bytes needed for the header.
So buffer of the same size is then used to send file itself.
Currently it is 198 bytes, which results in a pretty slow file serving.
Describe the solution you'd like
Create a KConfig entry for that, e.g. CONFIG_HTTP_SERVER_STATIC_FS_RESPONSE_SIZE
,
and, if its not equal to 0 (alternatively also if it is bigger than this calculated value), use it instead of STATIC_FS_RESPONSE_SIZE
Suggested fix:
#92971
Or we could rename STATIC_FS_RESPONSE_SIZE
to STATIC_FS_RESPONSE_HEADER_SIZE
, because that's what its, let it be calculated as it is now, and then use a separatre buffer of size CONFIG_HTTP_SERVER_STATIC_FS_RESPONSE_SIZE