Skip to content
代码片段 群组 项目
  • Nick Thomas's avatar
    c21c2cbf
    Test the behaviour of SendURL with less-common upstreams · c21c2cbf
    Nick Thomas 创作于
    Two cases in particular, lacking a `Content-Type`,  gave us trouble:
    
    * Transfer-Encoding: chunked
    * No content-type and no transfer-encoding
    
    Both of these are permitted by the HTTP RFC (cases 3 and 7), and we
    can talk to arbitrary HTTP servers via sendurl, so it's imperative that
    we handle them correctly. This commit adds tests for both cases.
    
    Responses of the latter type are transparently converted to responses
    of the former type. This is an automatic behaviour of the Go stdlib,
    which doesn't really support making the second type of response
    directly. Since Transfer-Encoding is a hop-by-hop header, this type of
    encoding is extremely common, and we're still streaming, instead of
    accumulating, the data, I think this is acceptable.
    c21c2cbf
    历史
    Test the behaviour of SendURL with less-common upstreams
    Nick Thomas 创作于
    Two cases in particular, lacking a `Content-Type`,  gave us trouble:
    
    * Transfer-Encoding: chunked
    * No content-type and no transfer-encoding
    
    Both of these are permitted by the HTTP RFC (cases 3 and 7), and we
    can talk to arbitrary HTTP servers via sendurl, so it's imperative that
    we handle them correctly. This commit adds tests for both cases.
    
    Responses of the latter type are transparently converted to responses
    of the former type. This is an automatic behaviour of the Go stdlib,
    which doesn't really support making the second type of response
    directly. Since Transfer-Encoding is a hop-by-hop header, this type of
    encoding is extremely common, and we're still streaming, instead of
    accumulating, the data, I think this is acceptable.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。