-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
环境
whistle: v2.6.16
描述
所有 DELETE HTTP 1.1 请求 (代理,Composer),无论此前是否有 Transfer-Encoding 头,都被添加了 Transfer-Encoding 头(没有显示在 Inspectors)以及分块传输编码。
示例
复现
使用任意方式通过 whistle 发送 DELETE HTTP 1.1 请求
可能相关的代码
Lines 517 to 543 in 0ad8e9e
| var isDelete = options.method === 'DELETE' && optHeaders['content-length'] == null; | |
| if (isDelete) { | |
| delete optHeaders['transfer-encoding']; | |
| } | |
| if (proxyUrl) { | |
| util.setClientId(optHeaders, req.enable, req.disable, req.clientIp, isInternalProxy); | |
| } else { | |
| var clientId = optHeaders[config.CLIENT_ID_HEADER]; | |
| if (clientId) { | |
| if (!util.isEnable(req, 'keepClientId')) { | |
| util.removeClientId(optHeaders); | |
| } | |
| req.setClientId && req.setClientId(clientId); | |
| } | |
| } | |
| if (req.isH2 && (headers[config.HTTPS_FIELD] || options.isPlugin)) { | |
| headers[config.ALPN_PROTOCOL_HEADER] = 'h2'; | |
| } | |
| options.headers = optHeaders = formatHeaders(optHeaders, req.rawHeaderNames); | |
| delete headers[config.WEBUI_HEAD]; | |
| if (headers[config.HTTPS_FIELD]) { | |
| delete headers[config.HTTPS_FIELD]; | |
| delete headers[config.ALPN_PROTOCOL_HEADER]; | |
| } | |
| if (isDelete) { | |
| optHeaders['Transfer-Encoding'] = 'chunked'; | |
| } |
Metadata
Metadata
Assignees
Labels
No labels

