- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
We have encountered an error in the http client library.
The expression in image #1 can cause the request (image #2) to be cleared when there is still data coming from the server.
As we understood this happens when the packet size is the same as the fragment size (response_info->total_remaining_length == fragment_available_data_length).
Is there any solution for this bug from the developers?
image #1
image #2
Solved! Go to Solution.
- Labels:
-
WICED Studio Wi-Fi Combo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Checked by traffic analyzer, there is no packet loss. TCP socket keeps responding to the server but HTTP client stops receiving data because it removed the request from the queue.
We have already solved this bug.
The problem was a type conversion when getting Content-Length in the first packet, which shows the file size. We were downloading a file of 3.5mb, which is more in bytes than the uint16_t the function returns:
static uint16_t get_content_length( char* data , uint16_t data_len)
We changed type to uint32_t, also changed local variables and related structure fields to this type.
I want to note, that this bug does not appear on all files, it seems to be connected with the size of the incoming packets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please explain the issue in a bit more detail. Is there packet loss at your end?
Thanks
Aditi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Checked by traffic analyzer, there is no packet loss. TCP socket keeps responding to the server but HTTP client stops receiving data because it removed the request from the queue.
We have already solved this bug.
The problem was a type conversion when getting Content-Length in the first packet, which shows the file size. We were downloading a file of 3.5mb, which is more in bytes than the uint16_t the function returns:
static uint16_t get_content_length( char* data , uint16_t data_len)
We changed type to uint32_t, also changed local variables and related structure fields to this type.
I want to note, that this bug does not appear on all files, it seems to be connected with the size of the incoming packets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the update. Glad to know that the issue is resolved at your end.