Request or HttpServerMinimal locks up if convert more than one string to integer
[Solved] There was an issue with ToInteger and single digit numbers. Thanks to Mike for send me on the right path.
I am using Mike G's HttpServerMinimal and I am passing a few query parameters that are numbers.
I have run into a couple different scenarios that are both causing problems.
This is the url I am using http://192.168.1.106:5000/settime?y=2011&mo=9&mi=6&h=21&dt=7&dw=4 and I am receiving this fine.
Following the RestLed method, I am doing this
bytemove(@numBuff, pin, strsize(pin))
temp := str.ToInteger(@numBuff)
bytefill(@numBuff, 0, strsize(pin))
This works fine for the first paramter but on any subsequent query parameter there is some sort of conflict between ToInteger and bytefill because the web server locks up and will not handle any further requests.
If I remove the bytefill command it doesn't lockup but as expected it starts getting invalid integers...
ToInteger "2011" -> 2011
ToInteger "9" => 9011
naturally, you would want to 0 out the numBuff with the bytefill command but that locks up the web server every time, again only on subsequent uses, not the first time.
I am stuck.
I am using Mike G's HttpServerMinimal and I am passing a few query parameters that are numbers.
I have run into a couple different scenarios that are both causing problems.
This is the url I am using http://192.168.1.106:5000/settime?y=2011&mo=9&mi=6&h=21&dt=7&dw=4 and I am receiving this fine.
Following the RestLed method, I am doing this
bytemove(@numBuff, pin, strsize(pin))
temp := str.ToInteger(@numBuff)
bytefill(@numBuff, 0, strsize(pin))
This works fine for the first paramter but on any subsequent query parameter there is some sort of conflict between ToInteger and bytefill because the web server locks up and will not handle any further requests.
If I remove the bytefill command it doesn't lockup but as expected it starts getting invalid integers...
ToInteger "2011" -> 2011
ToInteger "9" => 9011
naturally, you would want to 0 out the numBuff with the bytefill command but that locks up the web server every time, again only on subsequent uses, not the first time.
I am stuck.