Pergunta

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
Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top