MantisBT - NetSurf
View Issue Details
0002663NetSurf[All Projects] Generalpublic2019-06-04 05:172019-07-19 09:27
ReporterMichael Forney 
Assigned ToDaniel Silverstone 
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)
Daniel Silverstone   
2019-06-05 19: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 05:49   
Thanks! Your patch fixes the issue for me.
(0001948)
Daniel Silverstone   
2019-06-09 14:06   
Thank you Michael.
(0002004)
Vincent Sanders   
2019-07-19 09:27   
we believe this issue has been resolved in NetSurf 3.9

Issue History
2019-06-04 05:17Michael ForneyNew Issue
2019-06-05 19:55Daniel SilverstoneAssigned To => Daniel Silverstone
2019-06-05 19:55Daniel SilverstoneStatusnew => assigned
2019-06-05 19:55Daniel SilverstoneNote Added: 0001933
2019-06-07 05:49Michael ForneyNote Added: 0001940
2019-06-09 14:06Daniel SilverstoneStatusassigned => resolved
2019-06-09 14:06Daniel SilverstoneResolutionopen => fixed
2019-06-09 14:06Daniel SilverstoneFixed in Version => 3.9
2019-06-09 14:06Daniel SilverstoneTarget Version => 3.9
2019-06-09 14:06Daniel SilverstoneNote Added: 0001948
2019-07-19 09:27Vincent SandersStatusresolved => closed
2019-07-19 09:27Vincent SandersNote Added: 0002004