3

Je rencontre des problèmes pour que SharePoint 2010/IIS 7.5 respecte les demandes d'octets. Je développe un composant WebPart SharePoint 2010 à l'aide de Silverlight et j'essaie de récupérer une partie d'un document stocké dans SharePoint.SharePoint 2010/IIS 7.5 Demande de gamme d'octets répond avec le fichier entier

Lorsque je demande une plage d'octets d'un fichier dans SharePoint, le serveur répond avec le fichier entier. Cependant, si je demande la même plage d'octets à partir d'un fichier placé sur un serveur Apache, tout fonctionne comme prévu. Voici les en-têtes http observés avec Fiddler.

Toute aide serait vraiment appréciée! Merci.

Envoyé:

GET http://example.com/file.abc HTTP/1.1 
Accept: */* 
Accept-Language: en-US 
Referer: http://example.com/index.html 
Accept-Encoding: identity 
Range: bytes=1061285-1064594 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Safari/533.4 
Host: example.com 
Connection: Keep-Alive 

SharePoint prend également les informations de connexion:

Authorization: Negotiate TlRMTVNTUAABAAAAl4II4gAAAAAAAAAAAAAAAAAAAAAGAbAdAAAADw== 

Reçues de Apache:

HTTP/1.1 206 Partial Content 
Date: Wed, 25 Aug 2010 22:40:34 GMT 
Server: Apache/2.0.54 
Last-Modified: Fri, 20 Aug 2010 23:27:18 GMT 
ETag: "b68e346-103ea9-a3c20180" 
Accept-Ranges: bytes 
Content-Length: 3310 
Vary: User-Agent 
Content-Range: bytes 1061285-1064594/1064617 
Keep-Alive: timeout=5, max=99 
Connection: Keep-Alive 
Content-Type: application/x-zip 

Received de SharePoint 2010/IIS 7.5

HTTP/1.1 200 OK 
Cache-Control: private,max-age=0 
Content-Length: 1064617 
Content-Type: application/octet-stream 
Expires: Tue, 10 Aug 2010 22:40:56 GMT 
Last-Modified: Wed, 25 Aug 2010 19:28:39 GMT 
ETag: "{5A1DF927-D8CD-4BC0-9590-8188CF777A3D},1" 
Server: Microsoft-IIS/7.5 
SPRequestGuid: 99799011-5bdc-489f-99fd-d060a56d3ae4 
Set-Cookie: WSS_KeepSessionAuthenticated={7703be10-bb56-4fa1-ba8b-cd05f482859f}; path=/ 
X-SharePointHealthScore: 5 
ResourceTag: rt:[email protected] 
X-Content-Type-Options: nosniff 
Content-Disposition: attachment; filename=file.abc 
X-Download-Options: noopen 
Public-Extension: http://schemas.microsoft.com/repl-2 
Set-Cookie: WSS_KeepSessionAuthenticated={7703be10-bb56-4fa1-ba8b-cd05f482859f}; path=/ 
Persistent-Auth: true 
X-Powered-By: ASP.NET 
MicrosoftSharePointTeamServices: 14.0.0.4762 
Date: Wed, 25 Aug 2010 22:40:56 GMT 

Répondre

0

Remarque http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:

"Un serveur peut ignorer l'en-tête Range."

Ainsi, chaque fois que vous utilisez un en-tête Range, vous devez être capable de gérer une réponse 200. Le fait que votre serveur ne semble pas prendre en charge la télémétrie est regrettable, mais conforme.