提交 ddecc72b 编写于 作者: M Mislav Marohnić

Ensure `response.Request` is populated for responses from cache

https://github.com/github/hub/runs/397657829
上级 a6389b3a
......@@ -524,7 +524,7 @@ Feature: hub api
Then the exit status should be 22
And the stderr should contain exactly:
"""
You must authorize your token to access this organization:
http://example.com?auth=HASH
"""
......@@ -341,8 +341,9 @@ func (c *simpleClient) cacheRead(key string, req *http.Request) (res *http.Respo
}
res = &http.Response{
Body: ioutil.NopCloser(bytes.NewBufferString(parts[1])),
Header: http.Header{},
Body: ioutil.NopCloser(bytes.NewBufferString(parts[1])),
Header: http.Header{},
Request: req,
}
headerLines := strings.Split(parts[0], "\r\n")
if len(headerLines) < 1 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册