
Estoy haciendo el mismo tipo de solicitud a un servidor IIS7 e IIS8, pero sigo recibiendo esto416respuesta
$ curl-7.23.1-win64-ssl-sspi>curl -H Range:bytes=16- -I http://my.local.host/dotnetrocks_0813_syme_battochi.mp3
HTTP/1.1 416 Requested Range Not Satisfiable
Content-Length: 45740117
Content-Type: audio/mpeg
Last-Modified: Wed, 24 Oct 2012 09:14:29 GMT
Accept-Ranges: bytes
ETag: "97ab9ff8c7b1cd1:0"
Server: Microsoft-IIS/8.0
X-Powered-By: ASP.NET
Date: Tue, 30 Oct 2012 18:54:31 GMT
Content-Range: bytes */0
El rango está claramente dentro del tamaño del archivo, pero todavía no obtengo una206respuesta. ¿Que me estoy perdiendo aqui?
Respuesta1
Tuve el mismo problema y encontré la respuesta enhttps://stackoverflow.com/questions/18882776/curl-default-get-request-isnt-recognized-by-php.
Sinopsis: Al especificar la opción de solo encabezado, -I
se genera el método de solicitud HEAD. En su lugar, fuerce GET especificando -X
la opción.
Ejemplo:
curl -H Range:bytes=16- -I -X GET http://my.local.host/dotnetrocks_0813_syme_battochi.mp3