-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Currently I am transmitting an XML file (size approx. 700kB) via responses::FileContentResponse from SDcard to the Browser using a REST request/response. In the Browser I process this file using DOMParser()).parseFromString(str, "text/xml"). Approx. every 3rd transmission I get an error message from this parser saying:
XML Parsing Error: not well-formed Location: http://localhost:8080/test Line Number 2977, Column 16:
I analyzed the wireshark trace on some malicious transmissions and found out that on arbitrary positions in this file a character is corrupted; example: in the word "protocol" the last "o" (hex: 0x6F) is being replaced by 0 (hex: 0x00).
Now I am asking myself where this problem comes from. Currently I see the following possibilities:
- Error in reading from the SD card
The error might arise while reading the file from the SD card. Until now I did already many activities with reading files from the SD card and I never saw such an issue. So I think this root cause is not very likely. - Error in processing of the data stream in Smooth
I guess theresponses::FileContentResponseis also being used when transmitting plain HTML pages. Since simple HTML pages seem to work quite well (until now I never saw a problem here), I think also this root cause is quite unlikely the reason. - Error in lwip
Since lwip is very widely used I don't consider any specific problem here. - Error during TCP/IP transmission in my network
AFAIK TCP/IP tranmission has integrated crc checks. Additionally I don't see any other issues in my local network. So I guess this also is not the problem.
Having these possible root causes in mind I currently don't know which one is more likely. Or do you see other possible root causes which I did not consider until now? Do you have a suggestion where I should investigate first?