boost::asio::ip::tcp::iostream出现301状态码,意思是重定向,本来我想通过服务器发回来的响应头和响应内容找到新网址,但我观察了这些内容,发现里面给出的“新网址”与旧网址是一样的,哪位大神知道怎么办啊?
以下是 https://www.fltk.org/pub/fltk/1.3.5/fltk-1.3.5-source.tar.bz2 的响应头:
HTTP/1.1 301 Moved Permanently
Date: Fri, 15 May 2020 02:05:47 GMT
Server: Apache/2.4.18 (Ubuntu)
Location: https://www.fltk.org/pub/fltk/1.3.5/fltk-1.3.5-source.tar.bz2
Content-Length: 347
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.fltk.org/pub/fltk/1.3.5/fltk-1.3.
5-source.tar.bz2">here</a>.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at www.fltk.org Port 80</address>
</body></html>