Skip to content

Commit

Permalink
Merge pull request #963 from frogonwheels/fix-http-buff-clear
Browse files Browse the repository at this point in the history
http - Clear bad buffer if unexpected size.
  • Loading branch information
dexterbg committed Jan 14, 2024
2 parents dd78d24 + 3146ba5 commit 7125741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vehicle/OVMS.V3/components/ovms_http/src/ovms_http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ std::string OvmsHttpClient::GetBodyAsString()
if (filesize != expected)
{
ESP_LOGE(TAG, "Download file size (%d) does not match expected (%d)", filesize, expected);
body.empty();
body.clear();
}

Disconnect();
Expand Down

0 comments on commit 7125741

Please sign in to comment.