Skip to content

Commit

Permalink
Bugfix while using multiple handlers (#415)
Browse files Browse the repository at this point in the history
should pass updated req for remaining handlers
  • Loading branch information
chaudhryfaisal authored Dec 17, 2024
1 parent f31a87f commit 7711dfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func isEof(r *bufio.Reader) bool {
func (proxy *ProxyHttpServer) filterRequest(r *http.Request, ctx *ProxyCtx) (req *http.Request, resp *http.Response) {
req = r
for _, h := range proxy.reqHandlers {
req, resp = h.Handle(r, ctx)
req, resp = h.Handle(req, ctx)
// non-nil resp means the handler decided to skip sending the request
// and return canned response instead.
if resp != nil {
Expand Down

0 comments on commit 7711dfa

Please sign in to comment.