webmock icon indicating copy to clipboard operation
webmock copied to clipboard

Patron adapter does not currently "follow" redirects

Open foca opened this issue 1 year ago • 1 comments

Patron, as a wrapper of libcurl, works similarly to Curb where if you set max_redirects on a request, it will follow them automatically, and then return the "last" URL requested as response.url.

WebMock already handles this for Curb, but does not do it for Patron.

foca avatar Oct 03 '24 17:10 foca

@foca thank you for reporting.

In case of Curb, one needs to set follow_location to true. I believe Patron follows redirects by default.

I also noticed that Curb adapter doesn't support max_redirects setting.

bblimke avatar Oct 03 '24 18:10 bblimke