You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I have been testing alarm server with Dahua model ITC415-PW6M-IZ-C2, which has cgi-bin/snapManager.cgi API route for event management.
On Windows 10, go version 1.19.2 everything works like a charm.
On Linux Ubuntu Server, go version 1.19.3 the function part.Read from lib multipart reads out only about a half of data from response body. The other half of byte array is filled with zeros.
The issue only appears for bigger payloads (i.e. 3925 bytes, the n value from calling part.Read is only 1281).
Could you please give some advice how to address this issue?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
MiKoKappa
changed the title
Dropped body park on Linux w/ Dahua
Dropped body part on Linux w/ Dahua
Nov 15, 2022
Managed to get full request body by using io.ReadFull in function readEvents of server.go in dahua folder as so: _, err = io.ReadFull(part,body) instead of _, err = part.Read(body).
Hi!
I have been testing alarm server with Dahua model ITC415-PW6M-IZ-C2, which has cgi-bin/snapManager.cgi API route for event management.
On Windows 10, go version 1.19.2 everything works like a charm.
On Linux Ubuntu Server, go version 1.19.3 the function part.Read from lib multipart reads out only about a half of data from response body. The other half of byte array is filled with zeros.
The issue only appears for bigger payloads (i.e. 3925 bytes, the n value from calling part.Read is only 1281).
Could you please give some advice how to address this issue?
Thank you in advance.
The text was updated successfully, but these errors were encountered: