문제

I am using a perl socket to request a page, the response I am getting back however is a 301 moved page, but the location it gives is the same one I am requesting. Does anyone know why this is happening and what header I should send to avoid the 301?

GET /security/data/oval/com.redhat.rhsa-all.xml HTTP/1.1
Host: redhat.com
Connection: close
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Accept: text/html, application/xhtml+xml, */*

HTTP/1.0 301 Moved Permanently
Location: http://www.redhat.com/security/data/oval/com.redhat.rhsa-all.xml
Server: BigIP
Connection: close
Content-Length: 0
도움이 되었습니까?

해결책

The location is not the same. The Hostname is different.

You are asking for redhat.com, it is telling you to go to www.redhat.com.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top