It turns out that the problem was not caused by redirects. It was segfaulting because the timeout was too small. I added code to prevent the segmentation fault on an empty response and increased the timeout to 30 seconds.
It turns out that the problem was not caused by redirects. It was segfaulting because the timeout was too small. I added code to prevent the segmentation fault on an empty response and increased the timeout to 30 seconds.