大网数据广告活动
网络与域名解析

Ack for Cancel-Session

· 52CE 我爱测

Use the Ack for Cancel-Session packet to acknowledge the client's Cancel-Session request. The server sends the acknowledgment after releasing all resources associated with the upload session.

Use the Ack for Cancel-Session packet to acknowledge the client's Cancel-Session request. The server sends the acknowledgment after releasing all resources associated with the upload session.

reason-code reason-description
BITS-Packet-Type: Ack
BITS-Session-Id: {guid}
Content-Length: length
BITS-Error-Code: error-code
BITS-Error-Context: error-context

Headers

reason-code

Replace reason-code with the HTTP reason code. For example, set reason-code to 200 if success. For a list of HTTP reason codes, see RFC 2616.

reason-description

Replace reason-description with the HTTP description associated with the reason code. For example, set reason-description to OK if reason-code is 200.

BITS-Packet-Type

Identifies this response packet as an Ack packet.

BITS-Session-Id

String GUID that identifies the session to the client. Replace {guid} with the session identifier that the client sent in the Cancel-Session request packet. If you do not recognize the session identifier, set the BITS-Error-Code header to BG_E_SESSION_NOT_FOUND.

Content-Length

Replace length with the number of bytes included in the body of the response. Required even if the body of the response does not include content.

BITS-Error-Code

Replace error-code with a hexadecimal number that represents an HRESULT value associated with a server-side error. Only include this header if reason-code is not 200 or 201.

BITS-Error-Context

Replace error-context with a hexadecimal number that represents the context in which the error occurred. Specify the hexadecimal number for BG_ERROR_CONTEXT_REMOTE_FILE (0x5) if the server generated the error. Otherwise, specify the hexadecimal number for BG_ERROR_CONTEXT_REMOTE_APPLICATION (0x7) if the error was generated by the application to which the upload file is passed. Include this header only if the reason-code is not 200 or 201.

Remarks

The BITS client resends the Cancel-Session packet if the reason-code is in the range from 500 through 599, unless the BITS-Error-Code header is present with a value of BG_E_SESSION_NOT_FOUND. The client will not retry for reason codes 100 through 499.

See also

Ack for Close-Session

Cancel-Session

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。