S40 Phones sending HTTP request twice
I've come across a strange problem especially with S40 phones (5220, 3120C, 3110C). I have a simple application that sends out HTTP request to the server. On server I introduced a delay of 100 sec before responding. In server logs I could see that 2 HTTP requests (with a time interval of 37 sec in between) have been received by the server, whereas, client had sent only one. When tried with S60 or other manufacturer (Sony ericcson), it works fine and there is only one request in the logs.
Has anyone ever faced this kind of issue before? Any workarounds for this? Please suggest ASAP.
Re: S40 Phones sending HTTP request twice
Why the 100 second delay before responding? My guess is that something (perhaps the phone, but more likely a proxy) has decided that the server did not receive the request, so is sending it again. The server really needs to reply promptly to avoid time-out issues.
If you need time to construct a response on the server, see if you can send part of a response (the header, for example) immediately, then send the rest later.
Graham.
Re: S40 Phones sending HTTP request twice
[QUOTE=grahamhughes;689440]Why the 100 second delay before responding? My guess is that something (perhaps the phone, but more likely a proxy) has decided that the server did not receive the request, so is sending it again. The server really needs to reply promptly to avoid time-out issues.
If you need time to construct a response on the server, see if you can send part of a response (the header, for example) immediately, then send the rest later.
Graham.[/QUOTE]
Hi Graham, Thanks for the reply. We are working on server side to improve the response time but can you confirm if it is a known behavior of the S40 phones? Is there any workaround to control it (like increasing the time out) on client end? so that we can stop sending the 2nd request (which is of course not at the application code level).
Gaurav
Re: S40 Phones sending HTTP request twice
It might not be the phone, it might be the network. It may be related to using a WAP-based connection rather than a TCP connection.
Is the server sending [i]anything[/i] back immediately, or do you wait before starting to respond?
Graham.