3.2.5.4 DOWNLOAD-REQUEST

The server MUST query BITS Peer-Caching: Peer Authentication for the status of the certificate as specified in BITS Peer-Caching: Peer Authentication section 3.1.6.1. If BITS Peer-Caching: Peer Authentication reports that the client’s certificate is not present in the table of peer certificates, the server MUST return an HTTP error response, as specified in section 3.2.5.1, using an HTTP status code of 400.

The URL of the message MUST be of the following form.

 "/BITS-peer-caching/{" record-ID "}"  

If it is not, the server MUST reply with an HTTP error response, as specified in section 3.2.5.1, using an HTTP status code of 404.

If the message contains a Content-Length header with a value greater than zero, the server MUST reply with an HTTP error response, as specified in section 3.2.5.1, using an HTTP status code of 400.

If the record-ID of the request fails to match any row in the table of content records, then the server MUST respond with an HTTP error response, as specified in section 3.2.5.1, using an HTTP status code of 404. Otherwise, the server MUST send a DOWNLOAD-RESPONSE message, and the HTTP status code MUST be either 200 or 206.

If the request contains a Content-Range header for a single range covering all ranges in the ordered list of ranges in the table of content records, the server MAY return either status 200 or 206.<24> Otherwise, the server MUST return status 206 when the request contains a Content-Range header and status 200 when the request does not contain a Content-Range header. The following also applies to the request:

  • The response byte ranges MUST be taken from the matching ranges of DataBuffer in the content record.

  • The response Last-Modified header MUST be set to FileModificationTime. For details, see [RFC2616] section 14.29.

  • If the request contains multiple byte-range requests, the response MUST return the byte ranges in the same order as in the GET request; the response MUST NOT merge or reorder ranges.

  • For the record found, the content record's FileCreationTime, FileLastAccessTime, FileModificationTime, and FileAttributes are copied from the ADM record fields of the same name into the same named elements of the Download response.