network.request issue for iOS

In my app I have 3 previous network.request calls that work flawlessly on both iOS and android devices.

Anyway, it’s my 4th network.request that is the issue…  It is basically a form submission that sends variable data in the URL ( The server / PHP webpage accepts the variables using $_GET ).

It works perfect for android and on the android simulator in windows.  However on a Mac and on iOS devices the button gets pressed but absolutely no response is recieved and the webpage is not getting the data (since some of that data is set to save to a database). I even have the listener set to have a popup (native.showAlert) if I get any response…but i get nothing.

I am sending 10 form items in the URL and some can potentially be long and include a variety symbols. One of my other network.request calls sends 2 variables in the URL,  with that webpage using the same $_GET scheme for sending variables and returns an integer for verification. That one works perfect on android and iOS.

So anyway… I am at a loss on this. Does iOS have some picky rule about length of a URL… or maybe not allowing a space or “\n” to be listed in the URL?? 

Or is there something else I could be missing?  FYI: the submit does show itself being pressed (with the over image showing, then switching back to normal upon release).

Any help or suggestions is appreciated.

Any suggestions?

Are you urlencoding your data in your GET string?  Non-letters and numbers (including spaces and symbols) need to be encoded to safe values.

[code]

function urlencode(str)
  if (str) then
    str = string.gsub (str, “\n”, “\r\n”)
    str = string.gsub (str, “([^%w])”,
        function © return string.format ("%%%02X", string.byte©) end)
    str = string.gsub (str, " ", “+”)
  end
  return str    
end

URL = “http://somesite.com?var1=” … urlencode(value1) … “&var2=” …urlencode(value2)

etc.

Excellent. Just before I got the email that you replied I realized that this is what I am not doing. Funny how it happened to work for android…

Thanks Rob!

Are you urlencoding your data in your GET string?  Non-letters and numbers (including spaces and symbols) need to be encoded to safe values.

[code]

function urlencode(str)
  if (str) then
    str = string.gsub (str, “\n”, “\r\n”)
    str = string.gsub (str, “([^%w])”,
        function © return string.format ("%%%02X", string.byte©) end)
    str = string.gsub (str, " ", “+”)
  end
  return str    
end

URL = “http://somesite.com?var1=” … urlencode(value1) … “&var2=” …urlencode(value2)

etc.

Excellent. Just before I got the email that you replied I realized that this is what I am not doing. Funny how it happened to work for android…

Thanks Rob!