cURL - malformed error


I am trying to solve out the problem with sending data from Yun to external server. Becuase of the timeout issue I use the Process library and curl command as shown bellow. I use the function called httpSend:

void httpSend(String httpString) {
  String urlSend = "";
  urlSend += httpString;
  Process p;              

The first instance of the function goes fine (with exit value 0). But all the following report the exit value 3, i.e. URL malformed. But when I check the URL string on Serial monitor all strings are the same structure (with slightly different values). Also the length of strings are identical...

The first is okay:

length: 191
exit: 0

The second is the same but with exit error - value 3 - url malformed:

length: 191
exit: 3

Any idea??? I know the string is quite long but this should be the point... I also tried to add flush() function at end with no result.

Thanks for your hints!


The last "&" from ...H18=32438& make url not wellformed. fix it?

Use Linux console test every URL string on Serial monitor:

curl  URLstring