Maybe you should run wireshark and compare what your application and curl do?