MantisBT - NetSurf
View Issue Details
0002663NetSurf[All Projects] Generalpublic2019-06-04 04:172019-07-19 08:27
ReporterMichael Forney 
Assigned Tokinnison 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version3.9Fixed in Version3.9 
Fixed in CI build #
Reported in CI build #
URL of problem page
Summary0002663: curl 7.65.0 breaks HTTP redirects
DescriptionI noticed after upgrading to 7.65.0 that HTTP redirects don't work anymore. I bisected this down to https://github.com/curl/curl/pull/3837, which prevents calls into the curl API from callbacks, since that is unsupported usage.

It looks like the root of the issue is that fetch_curl_data (a curl callback) can trigger a new fetch request, which calls curl_multi_add_handle, which is now failing with CURLM_RECURSIVE_API_CALL.

I think to resolve this, netsurf needs to wait until fetch_curl_done to start new requests for redirects.
Steps To Reproduce1. Build netsurf against curl 7.65.0
2. Load a URL resulting in a redirect, such as https://httpstat.us/302
3. Request appears to hang
TagsNo tags attached.
Attached Files

Notes
(0001933)
kinnison   
2019-06-05 18:55   
Hi,

I'm unable to reproduce this myself as I don't have a new enough cURL but I've added a patch which ought to mitigate this. Could you please try running CI#4655 (or building a new version from master if that's how you're diagnosing) so that we can see if this helps.

Thanks,

Daniel.
(0001940)
Michael Forney   
2019-06-07 04:49   
Thanks! Your patch fixes the issue for me.
(0001948)
kinnison   
2019-06-09 13:06   
Thank you Michael.
(0002004)
Vincent Sanders   
2019-07-19 08:27   
we believe this issue has been resolved in NetSurf 3.9

Issue History
2019-06-04 04:17Michael ForneyNew Issue
2019-06-05 18:55kinnisonAssigned To => kinnison
2019-06-05 18:55kinnisonStatusnew => assigned
2019-06-05 18:55kinnisonNote Added: 0001933
2019-06-07 04:49Michael ForneyNote Added: 0001940
2019-06-09 13:06kinnisonStatusassigned => resolved
2019-06-09 13:06kinnisonResolutionopen => fixed
2019-06-09 13:06kinnisonFixed in Version => 3.9
2019-06-09 13:06kinnisonTarget Version => 3.9
2019-06-09 13:06kinnisonNote Added: 0001948
2019-07-19 08:27Vincent SandersStatusresolved => closed
2019-07-19 08:27Vincent SandersNote Added: 0002004