简体   繁体   English

在移动数据中没有收到cookie但在android注册期间收到了wifi(设备是sony xperia)

[英]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. 我正在使用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. 如果我通过移动数据进行注册,我的cookie不是来自服务器但是如果我通过WIFI做同样的任务,cookie就会正常运行。 And this problem is being faced on just one handset ie "SONY XPERIA M". 只有一部手机即“SONY XPERIA M”正面临这个问题。 On other handset, cookies are coming on both via mobile data and via wifi too. 在其他手机上,Cookie也通过移动数据和wifi传输。 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. 看看你的cookie参数。 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. 尝试通过VPN路由您的互联网流量,以便绕过您的网络提供商可能适用的任何不明智的过滤或CGN。
  3. Switch your application to HTTPS. 将您的应用程序切换到HTTPS。 HTTPS cannot be manipulated by intermediaries, so your cookies should be safe. HTTPS不能被中介操纵,因此您的cookie应该是安全的。
  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. 如果您使用tcpdump知道它的IP地址,则可以从移动设备捕获数据包,然后在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. 另外,请查看您的设备认为的IP地址是否与流量相同。 If it isn't, a NAT or transparent proxy is in place. 如果不是,则使用NAT或透明代理。
  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. 有一些Android应用程序。

I hope this helps. 我希望这有帮助。 If you need additional help, please post a lot more information, especially the exact cookie header you are sending out. 如果您需要其他帮助,请发布更多信息,尤其是您发送的确切cookie标头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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