If (UploadSuspended is TRUE)
Set State to SUSPEND
Return from this state.
If (BITSErrorCode is BG_E_SESSION_NOT_FOUND)
Set State to CREATE-SESSION
Return from this state.
If (HTTPStatusCode is 401 or 407)
If (UploadEntityInfo.AuthCredentials were not already supplied)
Add UploadEntityInfo.AuthCredentials to the request
Resend the previous message that failed with this error.
If (UploadEntityInfo.AuthCredentials were already supplied)
Return the error info (HTTPStatusCode , BITSErrorCode and BITSErrorContext) to the higher-layer protocol so proper action can be taken
If (HTTPStatusCode is 413)
Reduce the FRAGMENT-LENGTH based on an implementation-dependent method.
Set State to FRAGMENT.
Return from this state.
If (HostIdFallback timer has not already started)
If (UploadEntityInfo.BitsHostId is not empty)
Start the HostIdFallback timer with UploadEntityInfo.BitsHostIdFallbackTimeout value
Return the error info (HTTPStatusCode , BITSErrorCode and BITSErrorContext) to the higher-layer protocol so proper action can be taken