LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unable to send HTTP POST request using PPP over GPRS (http://www.linuxquestions.org/questions/linux-networking-3/unable-to-send-http-post-request-using-ppp-over-gprs-657578/)

harsh_electro 07-23-2008 12:15 AM

Unable to send HTTP POST request using PPP over GPRS
 
Hi All,

I have been trying to solve a puzzle for last 15 odd days. I am using WindRiver Linux.

I have ppp connection to send data over GPRS.

My client code has been tested on Ethernet. I mean I can send data using HTTP POST request using the client code. I can get response of HTTP GET request as well.

The same code works well for the HTTP GET request over the GPRS when the connection is established using PPP.

The only problem I face is that HTTP POST request doesn't go through. The server even doesn't get the request.(I am using the same PPP connection which used during the HTTP GET request).

I have checked the HTTP POST request syntax. I believe that it is fine since, I can send the same request over the Ethernet and I get the response from the server.



In short


1) HTTP POST AND HTTP GET request over ETHERNET works 100% fine.
2) HTTP GET request over GPRS works fine.
3) HTTP POST request over GPRS doesn't work.(Even request doesn't reach to the server).


I tried most of the debugging. The only difference in HTTP GET and HTTP POST request is the size of the data.

I know that my cmux protocol (gsm0710) doesn't allow to transmit more than 255 bytes at one shot.

But the GET request is also greater than 255 bytes (Including TCP/IP header overhead)


Please recommend anything to fix this?

Regards
Harsh

acid_kewpie 07-23-2008 07:07 AM

well I think you need to split the issue up as much as possible and confirm if the traffic is reaching the system or not. can you see the traffic arrive via wireshark / tcpdump?

harsh_electro 07-23-2008 09:49 AM

Quote:

Originally Posted by acid_kewpie (Post 3223600)
well I think you need to split the issue up as much as possible and confirm if the traffic is reaching the system or not. can you see the traffic arrive via wireshark / tcpdump?

Hi Chris,

I think that is the puzzle. When I send HTTP GET request I get response from the server.

I am also getting response of the ping command from the server once PPP link is up.

The only thing doesn't work is that I don't get any traffic on the server when I send HTTP POST over PPP link.

THe same HTTP post request works fine if I send it using the ETHERNET.


Let me know if you need any more information.

Regards
Harsh

acid_kewpie 07-23-2008 10:01 AM

Well yes so does the POST actually hit the box? you say "traffic", does this really mean at raw TCP/IP level? Have you tried forming your own POST using telnet or netcat for example?

harsh_electro 07-23-2008 11:22 AM

HTTP POST request fails over GPRS
 
Quote:

Originally Posted by acid_kewpie (Post 3223713)
Well yes so does the POST actually hit the box? you say "traffic", does this really mean at raw TCP/IP level? Have you tried forming your own POST using telnet or netcat for example?

Hi Chris,

Thank you very much for the prompt reply.

Here is some more information.
ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:528 (528.0 B) TX bytes:528 (528.0 B)

ppp0 Link encap:Point-Point Protocol
inet addr:10.190.5.9 P-t-P:10.190.5.9 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1823 (1.7 KiB) TX bytes:471 (471.0 B)

When I send (POST) the data using CURL POST It reaches to the server
with IP address 139.85.223.250

PING 139.85.223.250 (139.85.223.250): 56 data bytes

84 bytes from 139.85.223.250: icmp_seq=3 ttl=45 time=721.4 ms
84 bytes from 139.85.223.250: icmp_seq=3 ttl=45 time=721.4 ms

-- 139.85.223.250 ping statistics ---
5 packets transmitted, 4 packets received, 20% packet loss


But When I try to telnet the device I don't get any response.

telnet 139.85.223.250
I don't see any thing like login:

Surprising thing is that, If I use CURL library to send data to the server it successfully sends it using HTTP POST request. ( I don't want to use CURL library since it sends Header information in each POST request, I need to send it using Socket)

SO it is not sure what is causing this

Let me know your response.

Regards
Harshad

acid_kewpie 07-23-2008 01:21 PM

I'm still really keen to see proof of tcp/ip packets reaching the server in question during a POST, via wireshark or tcpdump.

by telnet i meant telnetting to port 80, not a telnet service itself, so you could manually type in a valid http post request

harsh_electro 07-23-2008 06:15 PM

HTTP POST request fails over GPRS
 
Quote:

Originally Posted by acid_kewpie (Post 3223954)
I'm still really keen to see proof of tcp/ip packets reaching the server in question during a POST, via wireshark or tcpdump.

by telnet i meant telnetting to port 80, not a telnet service itself, so you could manually type in a valid http post request

I tried the way you mentioned.

telnet 139.85.223.250 80
After a few seconds I got
"Connection closed by foreign host" from the HTTP server.

harsh_electro 07-25-2008 10:01 PM

HTTP POST successful
 
Quote:

Originally Posted by harsh_electro (Post 3224215)
I tried the way you mentioned.

telnet 139.85.223.250 80
After a few seconds I got
"Connection closed by foreign host" from the HTTP server.

I was able to transfer data to the server. It was ISP that was blocking traffic generated by me. I changed ISP and everything worked fine.


All times are GMT -5. The time now is 10:25 PM.