mirror of
https://github.com/rclone/rclone.git
synced 2025-02-22 21:41:35 +01:00
rc: pass response writer when needsResponse is set instead of pointer
rc: Fix failing tests for *http.ResponseWriter
This commit is contained in:
parent
a9713cd0ed
commit
6308153ae7
@ -120,7 +120,7 @@ func (p Params) GetHTTPResponseWriter() (*http.ResponseWriter, error) {
|
|||||||
}
|
}
|
||||||
request, ok := value.(*http.ResponseWriter)
|
request, ok := value.(*http.ResponseWriter)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, ErrParamInvalid{errors.Errorf("expecting http.ResponseWriter value for key %q (was %T)", key, value)}
|
return nil, ErrParamInvalid{errors.Errorf("expecting *http.ResponseWriter value for key %q (was %T)", key, value)}
|
||||||
}
|
}
|
||||||
return request, nil
|
return request, nil
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ func (s *Server) handlePost(w http.ResponseWriter, r *http.Request, path string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if call.NeedsResponse {
|
if call.NeedsResponse {
|
||||||
in["_response"] = &w
|
in["_response"] = w
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if it is async or not
|
// Check to see if it is async or not
|
||||||
|
Loading…
Reference in New Issue
Block a user