-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Description
When using the Safe library to propose transactions via the Safe Transaction Service API, requests fail with a ProposeTransactionFailed(308, ...) error containing an HTML redirect page.
Root Cause
The underlying solidity-http library uses curl without the -L flag, so HTTP redirects are not followed. The Safe Transaction Service API returns 308 Permanent Redirect responses (likely for URL normalization), which causes the request to fail.
Error Output
ProposeTransactionFailed(308, "\r308 Permanent Redirect\r\r308 Permanent Redirect\rnginx\r\r")
Fix
A fix has been submitted to the solidity-http library:
Recon-Fuzz/solidity-http#1
Once merged, updating the solidity-http dependency will resolve this issue.
Workaround
Manually patch lib/solidity-http/src/HTTP.sol line 150 to add redirect support by adding the -L flag:
- string memory scriptStart = 'response=$(curl -s -w "\\n%{http_code}" ';
+ string memory scriptStart = 'response=$(curl -sL -w "\\n%{http_code}" ';