3.1.5.2.1 Common to All Message Types

If the HTTP status code is 401 or 407, the client MUST follow the rules defined in [RFC2617] and [RFC2616] regarding sending the response for the authentication challenge.

If the HTTP status code is 403, the user does not have access rights to upload the request entity to the location specified through the destination URL. The client MUST return this error to the higher-layer protocol so that the necessary steps can be taken.

If the HTTP status code is 501 and the BITS-Error value returned as part of the response is x80070005, uploads are not enabled for the virtual directory, where the destination URL MUST be present. The client MUST return this error to the higher-layer protocol so that the necessary steps can be taken.

If the BITS-Error value returned as part of the response is x8020001F, the client MUST restart the upload with a CREATE-SESSION message. This is true for all the messages except CANCEL-SESSION (section 3.1.5.2.6).

If the BITS-Error value returned as part of the response is x80200020, it means that the size of the request entity is larger than the maximum request entity size specified for the virtual directory, as discussed in section 2.2.1.2. The client MUST return this error to the higher-layer protocol so that the necessary steps can be taken.

If the BITS-Error value returned as part of the response is x80070057, the values of the headers sent from the client do not satisfy the message rules previously specified. The client MUST return this error to the higher-layer protocol so that the necessary steps can be taken.

For all other HTTP status codes returned from the server that have a valid BITS-error, the client MUST return this error to the higher-layer protocol so that the necessary steps can be taken.

For all other HTTP status codes as specified in [RFC2616] section 10, the client MUST return this error to the higher-layer protocol so that the necessary steps can be taken.

The upload request timer MUST be started before each message is sent to the server. It MUST be stopped when the send is complete.

The upload response timer MUST be started before the response is requested from the server. It MUST be stopped when the response from the server is received with either a success status code or a failure status code.