Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avhttp redirect情况下的两个小bug #32

Open
krisbin opened this issue Aug 12, 2015 · 1 comment
Open

avhttp redirect情况下的两个小bug #32

krisbin opened this issue Aug 12, 2015 · 1 comment

Comments

@krisbin
Copy link

krisbin commented Aug 12, 2015

1、如果是post请求,在处理redirect的情况下,应该对返回的Location进行Get方式的访问,但是代码中还是POST继续请求下去,导致错误的请求。
2、get请求方式下,通过request_options设置的请求头信息,在redirect以后,会丢失,使用代码中默认设置的请求头来处理了,典型的就是自己设置的user_agent,在redirect请求的时候,user_agent发生了变化。

请求大大们处理,如果是使用方式不对,请大大们指点,感激感激!

@microcai
Copy link
Member

在问题解决前, 暂时可以先设定 max_redirect(0) 然后自己处理 302 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants