3.1 esp_http_client inserting headers into POST data.

BrettG
Posts: 29
Joined: Wed Feb 15, 2017 7:32 pm

3.1 esp_http_client inserting headers into POST data.

Postby BrettG » Fri Jan 25, 2019 5:53 pm

Hi, I am using esp_http_client to send large chunks of data. We are having an issue where, very infrequently, the HTTP headers, set for the POST via esp_http_client_set_header, are being injected into the middle of the POST data.

The data is a chunk of an image being sent as a 12800 length null terminated byte string.

I thought it may be the data being treated as a string and somehow injecting the header string into the data if there was a '%' character present. But the issue did not subside after sanitizing the data of any '%' characters before handing it off to esp_http_client_set_post_field.

I have attached a snippet of the data containing the header for reference.
example snippet.txt
(369 Bytes) Downloaded 679 times
Are there other special characters we should be removing from the by string, or any flags to better handle what data that we are trying to send. Or is esp_http_client not built to send raw byte data?

Any help is greatly appreciate,
- Brett

Who is online

Users browsing this forum: No registered users and 168 guests