HTTP Redirects caused by public hotspots

时光总嘲笑我的痴心妄想 提交于 2021-01-28 23:31:54

问题


When a user connects for the first time to a public hotspot they often get back a welcome page with a login, instead of the requested page. This can also happen when you request a page from code, leading to corruption. We expect this type of page should always return a "302 redirect", but hard evidence that this always happens is hard to come by and we think some users may be getting back corrupted data - with a 200 return from hotspots in the world.

Does anyone know what the correct behaviour of a hotspot is, and the way to avoid it getting into the flow?

This also goes for proxies that downsample images over 3G connections etc. We have resorted to hashing our files with an integrity check to throw out altered data, but this seems a very heavy weight solution.

Note: we're happy with the data being proxied, we just want it left unaltered.


回答1:


The correct status code for this case would be status code 511 (http://greenbytes.de/tech/webdav/rfc6585.html#status-511)



来源:https://stackoverflow.com/questions/19892333/http-redirects-caused-by-public-hotspots

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!