LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-22-2008, 11:15 PM   #1
harsh_electro
LQ Newbie
 
Registered: Jun 2006
Location: New York
Distribution: Ubuntu
Posts: 12

Rep: Reputation: 0
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
 
Old 07-23-2008, 06:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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?
 
Old 07-23-2008, 08:49 AM   #3
harsh_electro
LQ Newbie
 
Registered: Jun 2006
Location: New York
Distribution: Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
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
 
Old 07-23-2008, 09:01 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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?
 
Old 07-23-2008, 10:22 AM   #5
harsh_electro
LQ Newbie
 
Registered: Jun 2006
Location: New York
Distribution: Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
HTTP POST request fails over GPRS

Quote:
Originally Posted by acid_kewpie View Post
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
 
Old 07-23-2008, 12:21 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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
 
Old 07-23-2008, 05:15 PM   #7
harsh_electro
LQ Newbie
 
Registered: Jun 2006
Location: New York
Distribution: Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
HTTP POST request fails over GPRS

Quote:
Originally Posted by acid_kewpie View Post
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.
 
Old 07-25-2008, 09:01 PM   #8
harsh_electro
LQ Newbie
 
Registered: Jun 2006
Location: New York
Distribution: Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
HTTP POST successful

Quote:
Originally Posted by harsh_electro View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NetworkManager & gprs/ppp DNS: after using wlan/eth0, DNS for ppp doesn't work mtess Linux - Networking 3 03-12-2008 03:31 PM
redirect http request to https with "post method" FMH Linux - General 0 10-01-2007 02:16 AM
GPRS PPP problem HELP ibibiking Linux - Wireless Networking 4 04-30-2006 02:11 PM
ppp + gprs vampire Janus Linux - Networking 0 10-21-2004 06:06 AM
HTTP request parsing: POST mofofish Programming 3 12-05-2003 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration