If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Bug - httpPost Module - Long Results
7 posts
• Page 1 of 1
Bug - httpPost Module - Long Results
Hello!
I think i have detected a bug in the HTTP-Post module is you get back verry long (about 0.1Mbyte) results.
The contet of the result is a preset-file that was saved by the preset-text-save module.
I uploaded a preset text to an PHP file that stores it on a SQL Database. The datatype of the SQL feeld is "LONGTEXT"
If i watch it on phpMyAdmin then the value is correct in the feeld. If i read out the result PHP by firefox, the result is also OK.
If i turn the php file to GET Methode and i use "url2file.exe" then i also get the correct result.
BUT if i use the HTTP Post module with a PHP that uses POST Methode i get back a string with a lot unknown-letters.
I did now a workaround with the "url2file.exe" i can rest for a moment but it hase one problem - some virus-scanner detact problems with this file and they want to delete it.
Regards
C.Hackl
I think i have detected a bug in the HTTP-Post module is you get back verry long (about 0.1Mbyte) results.
The contet of the result is a preset-file that was saved by the preset-text-save module.
I uploaded a preset text to an PHP file that stores it on a SQL Database. The datatype of the SQL feeld is "LONGTEXT"
If i watch it on phpMyAdmin then the value is correct in the feeld. If i read out the result PHP by firefox, the result is also OK.
If i turn the php file to GET Methode and i use "url2file.exe" then i also get the correct result.
BUT if i use the HTTP Post module with a PHP that uses POST Methode i get back a string with a lot unknown-letters.
I did now a workaround with the "url2file.exe" i can rest for a moment but it hase one problem - some virus-scanner detact problems with this file and they want to delete it.
Regards
C.Hackl
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
Re: Bug - httpPost Module - Long Results
Is "url2file.exe" an exe you created using FlowStone - if not what is it?
Would you be able to provide an example schematic that illustrates the problem and send it to us on the email address at the top of this page?
Many thanks.
Would you be able to provide an example schematic that illustrates the problem and send it to us on the email address at the top of this page?
Many thanks.
-
support - Posts: 151
- Joined: Fri Sep 07, 2012 2:10 pm
Re: Bug - httpPost Module - Long Results
no
URL2File is an extra Project that HTTP-GETs an URL to a file.
http://www.chami.com/free/url2file_wincon.html
It is done by Shell execute.
I'll go up and post an example within next hour
URL2File is an extra Project that HTTP-GETs an URL to a file.
http://www.chami.com/free/url2file_wincon.html
It is done by Shell execute.
I'll go up and post an example within next hour
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
Re: Bug - httpPost Module - Long Results
Well here is an example
You'll Need the URL2FILE.EXE found here:
http://www.chamisplace.com/asp/redir.asp?i=DL_U2F_W_ZIP
If you have a 32BIT System copy file here:
C:\Windows\System32
If you have 64bit:
C:\Windows\SysWOW64
Then Windows is able to use it without any path on a shellexecute and is called by URL2FILE
Regards
You'll Need the URL2FILE.EXE found here:
http://www.chamisplace.com/asp/redir.asp?i=DL_U2F_W_ZIP
If you have a 32BIT System copy file here:
C:\Windows\System32
If you have 64bit:
C:\Windows\SysWOW64
Then Windows is able to use it without any path on a shellexecute and is called by URL2FILE
Regards
- Attachments
-
- http-post.fsm
- HTTP-Post error Long String
- (22.06 KiB) Downloaded 1073 times
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
Re: Bug - httpPost Module - Long Results
Thanks. Leave it with us and we'll have a look.
-
support - Posts: 151
- Joined: Fri Sep 07, 2012 2:10 pm
Re: Bug - httpPost Module - Long Results
I've had a look at this. The hex returned by the module using the HTTP Post component has an extra 18 characters. The two modules seem to agree up to index 65627 in the string. At that point the one from HTTP Post has 9 characters ("303030300") before continuing the same as the other string (obtained using URL2FILE). There is another inserted string of 9 characters at index 130959. In this case the string is "3030300D0". Apart from that the returned values are identical.
The unknown characters come after you convert from Hex to String so they are not added by the HTTP Post.
There are two possible explanations. Either the HTTP Post has inserted these two strings or the issue is in your php. It seems unlikely that the HTTP Post would insert values at such arbitrary points. Repeating the process shows that the indexes and strings remain the same so that would suggest that it's probably not corruption.
I noticed that the two modules are not calling the same php file on your server - one uses preset_getm.php and the other uses preset_get.php. Are you sure the issue is not caused by some difference between the two php files?
The unknown characters come after you convert from Hex to String so they are not added by the HTTP Post.
There are two possible explanations. Either the HTTP Post has inserted these two strings or the issue is in your php. It seems unlikely that the HTTP Post would insert values at such arbitrary points. Repeating the process shows that the indexes and strings remain the same so that would suggest that it's probably not corruption.
I noticed that the two modules are not calling the same php file on your server - one uses preset_getm.php and the other uses preset_get.php. Are you sure the issue is not caused by some difference between the two php files?
-
support - Posts: 151
- Joined: Fri Sep 07, 2012 2:10 pm
Re: Bug - httpPost Module - Long Results
the one is the GET methode php (URL2FILE uses GET) the other is the POST Methode.
Well i saw now that the php System gets errors on Long results, i tried it on my synology NAS and there it worked quite fine most times - but all seems a bit Buggy because HTTP hase no error correction. Sometimes i receave totyl wrong message-data with a lot unknown sting BUT it is only 8 characters then it is normal again.
I'll prepare the URL2File metode now - this one GETs allways the correct data with no errors to get large data from the Server. BUT:
If i send lage data with GET - Error error error ^^
So as summary
GET (URL2FILE) GETs large DATA from the Server with no errors
POST (HTTP Post by FST) Posts large data to a Server with no errors
Did you ever thought about a HTTP-GET Module for FlowStone?
Because there are large differences between POST and GET on most Servers.
I tried to make won with a net-client (Found the DATA to send on WIKI) and it is working but verry Buggy and NOT with correct triggering (there are a lot of timers inside that would not be recogniced if the Module is in a Loop)
Mentioned just for fun to make it compleet but a bit offtopic
Also a FILE Open/Save module for Binaray-Data and BASE64 Coding would be verry awesome - becaue then we could send a file with http-post and get it with BASE64 coding, convert it and save it normal to the users HDD
Regards C.Hackl
Well i saw now that the php System gets errors on Long results, i tried it on my synology NAS and there it worked quite fine most times - but all seems a bit Buggy because HTTP hase no error correction. Sometimes i receave totyl wrong message-data with a lot unknown sting BUT it is only 8 characters then it is normal again.
I'll prepare the URL2File metode now - this one GETs allways the correct data with no errors to get large data from the Server. BUT:
If i send lage data with GET - Error error error ^^
So as summary
GET (URL2FILE) GETs large DATA from the Server with no errors
POST (HTTP Post by FST) Posts large data to a Server with no errors
Did you ever thought about a HTTP-GET Module for FlowStone?
Because there are large differences between POST and GET on most Servers.
I tried to make won with a net-client (Found the DATA to send on WIKI) and it is working but verry Buggy and NOT with correct triggering (there are a lot of timers inside that would not be recogniced if the Module is in a Loop)
Mentioned just for fun to make it compleet but a bit offtopic
Also a FILE Open/Save module for Binaray-Data and BASE64 Coding would be verry awesome - becaue then we could send a file with http-post and get it with BASE64 coding, convert it and save it normal to the users HDD
Regards C.Hackl
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 17 guests