连接某些页面的时候,总是出现'http/1.1 302 Found'的提示,为什么?(50分)

  • 主题发起人 powerpopeye
  • 开始时间
P

powerpopeye

Unregistered / Unconfirmed
GUEST, unregistred user!
连接某些页面的时候,总是出现'http/1.1 302 Found'的提示,为什么?

Project Project1.exe raised exception class EIdHTTPProtocolException with message'HTTP/1.1 302 Found'.Process stopped.Use Step or Run to continue.
 
请求重定向代码:300-399
http 状态码 302 的含义是: redirect
所请求的资源已经被暂时移走。用户将放一个Location标志头
来重定向到新的url上。用户以后的请求都会指向这个新的url。

也就是说,你收到302状态后,要解析 http header 的 Location 段。
会得到一个新的url,这个url才是真正你要连接的url。
3xx 代码 不是错误。5xx代码才是错误。
 
怎么解决呢?
 
如果redirect 后的地址是固定的话。你直接把最开始连接的url改成那个url就行了。
在http header 的location中有 url。
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
659
import
I
I
回复
0
查看
660
import
I
I
回复
0
查看
713
import
I
顶部