What should I do if curl simulates logon to the educational administration system into a redirection loop?

Source: Internet
Author: User
However, the target URL of the redirection is still the current page. After analysis, we found that a redirection cycle occurs. PS: After logging on to the educational administration system locally, you can enter the target website in the IE browser directly, but if you use Firefox or Chrome, the redirection loop will show: Objectmovedto... however, the target URL of the redirection is still the current page. Later I analyzed it and found that there was a redirection loop.
PS: After logging on to the educational administration system locally, enter the target website in IE browser to directly access
However, if Firefox and Chrome are used, there will be a redirection loop.
Display: Object moved to here.

Header information:

HTTP/1.1 302 Found Date: Fri, 26 Apr 2013 00:52:02 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Location: Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 117

Reply content:

However, the target URL of the redirection is still the current page. Later I analyzed it and found that there was a redirection loop.
PS: After logging on to the educational administration system locally, enter the target website in IE browser to directly access
However, if Firefox and Chrome are used, there will be a redirection loop.
Display: Object moved to here.

Header information:

HTTP/1.1 302 Found Date: Fri, 26 Apr 2013 00:52:02 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Location: Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 117

Install wireshark, intercept all request data of IE, and use curl for complete simulation

Add curl to the url specified in Location in the http header recursivelySetopt ($ ch, CURLOPTFOLLOWLOCATION, 1); try

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.