使用 HttpClient 4 通过 WiFi 进行 HTTPS 身份验证
我有 Android 宠物项目 DroidIn,它利用 HttpClient 4(内置于 Android 中)进行一些基于表单的身份验证。 我开始注意到使用 WiFi 的人报告连接问题。 我访问的网站具有自行分配的证书也无济于事。 好吧 - 问题是(我对 WiFi 详细信息很模糊)如果热点处的 WiFi 不支持 HTTPS,这将是连接失败的充分理由,除了使用代理到另一个应用程序服务器之外,我还能做些什么吗HTTP 又会调用 HTTPS 站点吗?
I have Android pet-project DroidIn which utilizes HttpClient 4 (built into Android) to do some form based authentication. I started noticing that people who are using WiFi are reporting connection problems. It also doesn't help that site I'm accessing has self-assigned certificate. Well - the question is (I'm quite vague on WiFi details) If WiFi at the hotspot doesn't support HTTPS would that be a good enough reason for connection to fail and is there anything that I can do beside proxying into another appserver using HTTP which then would call HTTPS site?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的 Air 应用程序也遇到同样的问题。 它叫做 Postal,是一款为巴西服务的邮件跟踪应用程序。 (如果您在 wifi 下尝试并反馈给我,我将不胜感激)。
它始终在 2G/3G 上工作,但在连接到 Wi-Fi 时很少工作。 除了 AIR 应用程序之外,其他一切都有效! 有时它可以工作,有时则不能在同一电话和/或接入点中。 当它不工作时,任何其他 AIR 应用程序也无法工作。
甚至 Tour de Flex Mobile AMF Remoting 测试应用程序也停止工作。
HTTPRequests 或 AMF Remoting 都不起作用。 它只是给出错误 404 - 找不到页面。
这不是路由器的问题,因为有时它可以工作。 我相信这是 AIR 中的一个问题,当活动网络适配器发生变化时,它会不断尝试通过 2G/3G。 Adobe 应该考虑一下这一点。
I have the same problem in my Air app. It's called Postal, a mail tracking app for Brazilian service. (I'd appreciate if you try it in wifi and feed me back).
It always works on 2G/3G but rarely works when connected to wi-fi. Everything else works but AIR APPS! Sometimes it works, sometimes it doesnt in the same phone and/or access point. And when it's not working, any other AIR app is not working also.
Even the Tour de Flex Mobile AMF Remoting test app stops working.
Neither HTTPRequests or AMF Remoting works. It just gives Error 404 - Page not found.
It's not a router thing because sometimes it works. I believe it's a problem in AIR when active network adapter changes it keeps trying to go through 2G/3G. It's something Adobe should take a look at.
wifi只是一个低级协议,你正在处理HTTP和HTTP协议。 TCP/IP 不知道 wifi。
所以你可以忽略你正在使用wifi的事实,只需尝试看看服务器是否可以从客户端访问。 (在 https 端口上尝试 telnet,默认端口为 443)
wifi is just a low level protocol, you are dealing with HTTP & TCP/IP which is unaware of wifi.
So you can ignore the fact that you are using wifi, just try to see if the server is accessible from the client side. (try a telnet on the https port which is 443 by default)
wifi 可能会阻止 443 端口 - 但我会感到惊讶,因为 https 是标准用户非常常用的协议。 如果被阻止,那可能是您的问题。 slmix 的答案会检测到这种情况 - 但由于您不在客户端,运行该 telnet 可能不切实际(即使 android 支持它)。
The wifi could be blocking the 443 port - but I'd be surprised since https is a pretty commonly used protocol by standard users. It if were blocked that could be your problem. slmix's answer would detect that case - but since you aren't with the client it probably isn't practical to run that telnet (even if android supported it).