where is your string end in data? strings need to be terminated with a null character in C, and this is required for use of %s. Your lucky that the program didn’t crash, because it could very well be that the memory contents after data doesn’t contain a 0x00 character for a length greater than 255 characters, so you would copy into the RAM after response variable and overwriting critical parts.
Also, I would suggest not to use wm_sprintf() just to concatenate strings. Use wm_strcpy() and wm_strcat() instead! I never had problems with that, where wm_sprintf() caused some trouble to me before.
That’s really strange. Can you send a copy of response to UART1 or check it with TRACE() ? How about Debug mode, can you check if the string is built correctly?
How about avoiding wm_strcat():
If you want to fix the problem, you need first to find exactly the point where it is: the first wm_strcat(), or the second wm_strcat(), or the WIP library, or the receiving server.
I don’t believe for a moment that that is exactly what the server is receiving byte for byte.
Are you sure that your server side program is actually written correctly when it gives you this output?