Skip to content

Commit

Permalink
Improve the code coverage of the gclient module (gogf#1899)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangqian1985 authored Jun 13, 2022
1 parent 7d5ab1f commit 31a23e7
Showing 3 changed files with 814 additions and 33 deletions.
5 changes: 1 addition & 4 deletions net/gclient/gclient_dump.go
Original file line number Diff line number Diff line change
@@ -37,10 +37,7 @@ func getResponseBody(res *http.Response) string {
// RawRequest returns the raw content of the request.
func (r *Response) RawRequest() string {
// Response can be nil.
if r == nil {
return ""
}
if r.request == nil {
if r == nil || r.request == nil {
return ""
}
// DumpRequestOut writes more request headers than DumpRequest, such as User-Agent.
Loading

0 comments on commit 31a23e7

Please sign in to comment.