Add HTTP response code support plus other tweaks to help in responding

This commit is contained in:
btsimonh
2022-02-12 11:08:20 +00:00
parent cd0db3a262
commit cff74553fa
3 changed files with 22 additions and 6 deletions

View File

@ -57,7 +57,9 @@ static void tcp_client_thread( beken_thread_arg_t arg )
request.fd = fd;
request.received = buf;
request.receivedLen = recv( fd, request.received, 1024, 0 );
request.receivedLenmax = 1024;
request.responseCode = HTTP_RESPONSE_OK;
request.receivedLen = recv( fd, request.received, request.receivedLenmax, 0 );
request.received[request.receivedLen] = 0;
request.reply = reply;