02-12-2022 10:51 PM
I am using LabVIEW 2016.
I find after call this vi with input url = "+ve" the output "body" replaced the "+' with " ". That cause my code of verification failed. (see attached)
I find it will have same issue for "\" and maybe other special characters.
Any idea help to fix this or handle the sting which contain special characters like "+" and "\" when I cal this vi ? BTW, this vi is password protected so I can not view the block diagram.
02-13-2022 04:38 AM - edited 02-13-2022 04:43 AM
The string in probe [10] is sent to the HTTP server as part of the url, the string in probe number [12] is what the server responded in the body of the HTTP message. While there is always the possibility that the many layers of code which the HTTP Client VIs calls may be responsible for such a problem, my suspicion is much more on what is going on at the HTTP server side.
And since you use HTTP rather than HTTPS here, the first cause of action is to start up Wireshark and look at the traffic on the wire. This will very quickly show you if the problem happens between the network adapter and your probe [12], which would indicate a LabVIEW bug, or before the data arrives at your network adapter, which will require you to start looking at how you handle the data on the server side!
The password protection is irrelevant. All this VI does is calling a shared library directly, so there is nothing for you to debug in there anyhow. But this shared library that is called is using libcurl and has a default url length limit of 1024 bytes. So your idea of passing such huge parameters as part of the request url can definitely cause other problems too.
02-14-2022
08:09 PM
- last edited on
11-06-2024
05:01 PM
by
Content Cleaner
I also tried add this vi to update the url string but still no luck.
https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/wsapi/vis/escape-http-url-vi.html
It turned out there maybe a problem in the way of the data transfer. Thank you for the suggestion !