Skip to content

Commit 2ff9b06

Browse files
committed
Revert changes that break spy mode
1 parent dd42a5b commit 2ff9b06

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/modes/spy_mode.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ func (this SpyMode) Process(request *http.Request, details models.RequestDetails
4949

5050
if matchingErr != nil {
5151
log.Info("Going to call real server")
52-
response, err := this.Hoverfly.DoRequest(request)
52+
modifiedRequest, err := ReconstructRequest(pair)
53+
if err != nil {
54+
return ReturnErrorAndLog(request, err, &pair, "There was an error when reconstructing the request.", Spy)
55+
}
56+
response, err := this.Hoverfly.DoRequest(modifiedRequest)
5357
if err == nil {
5458
log.Info("Going to return response from real server")
5559
return newProcessResult(response, 0, nil), nil

0 commit comments

Comments
 (0)