简体   繁体   中英

cookies are not received on mobile data but received with wifi during registration in android(device is sony xperia)

I am doing registration in my app using HTTP. If I do registration via MOBILE DATA my cookies are not coming from server But If i do the same task via WIFI cookies are coming properly. And this problem is being faced on just one handset ie "SONY XPERIA M". On other handset, cookies are coming on both via mobile data and via wifi too. Why so?

It is almost impossible to answer this question with this little information, but here's some general help to get your problem sorted out:

  1. Take a look at your cookie parameters. The domain, path, etc have to match the domain, path, etc. you are serving the page from. Some devices may be more lenient, others may not be.
  2. Try to route your internet traffic via a VPN, so you bypass any wonky filtering or CGN your network provider may apply.
  3. Switch your application to HTTPS. HTTPS cannot be manipulated by intermediaries, so your cookies should be safe.
  4. Do extensive traffic logging on the server if possible. You can capture packets from your mobile device if you know it's IP address using tcpdump and then display them in Wireshark. This should enable you to piece together why it isn't working.
  5. In the traffic dump take a look at the headers sent from the client. Be suspicious of any headers that may indicate the presence of proxies. Also take a look if the IP address your device thinks has is the same the traffic is coming from. If it isn't, a NAT or transparent proxy is in place.
  6. Try to sniff the traffic directly on the device and compare it to what the server sees. If the traffic differs, there is some proxying in place. There are some android apps for that.

I hope this helps. If you need additional help, please post a lot more information, especially the exact cookie header you are sending out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM