代理服务修改postbody内容相关问题
1. 如果修改了postForm 的内容,那么需要同步修改 请求的 contentType 的值,对于 go 来说需要修改的是 request.ContentType 里的值
以下是 源码中关于 contenType 字段的注释
ContentLength records the length of the associated content. The value -1 indicates that the length is unknown. Values >= 0 indicate that the given number of bytes may be read from Body. For client requests, a value of 0 with a non-nil Body is also treated as unknown.
翻译:
   ContentLength 表示关联内容的长度。
- 
- -1表示长度未知。
- >= 0的值表示可以从- Body中读取指定字节数。
- 对于客户端请求,当 Body不为nil且ContentLength为0时,也被视为长度未知。
 
todo: 补充整个 http 请求的流程,每个header 参数在那个地方拼接的
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号