Skip to content

HTTP requests fail with 308 redirects from Safe Transaction Service API #25

Closed

Description

@Khrafts

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}" ';

Activity

  1. aviggiano commented on Jan 12, 2026

    @aviggiano
    Collaborator

    Thanks for raising this, should be working now https://github.com/Recon-Fuzz/safe-utils/releases/tag/v0.0.17

  2. Khrafts commented on Jan 14, 2026

    @Khrafts
    Author

    Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions