Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump go-w3up, check content headers #2

Merged
merged 1 commit into from
Nov 17, 2024
Merged

Conversation

dtbuchholz
Copy link
Collaborator

@dtbuchholz dtbuchholz commented Nov 16, 2024

Summary

Bumps go-w3up and also makes the change it implements here.

Details

  • Note: even though we use go 1.21 and the error described by the w3s team happens with go 1.22, this seems to fix things.
  • The content-length check is all we need, and things work without updating to go-w3up v0.0.3...but we might as well bump it since it doesn't affect the behavior. If needed, we can remove the dep update and use go-w3up v0.0.2, and things will work.

How it was tested

  • Tried bumping to go-w3up v0.0.3, and I still received an empty server response, with the server logging this error:
     failed archiving CAR: status code: 403
    
  • Made the recommend check in rcpt.Out().Ok().Headers.Values for the content-length, and then uploading random / new files worked:
    {
       "root": "bafybeihx5mvoz7vdnjevt4724mpwm5eh6mhqrle22axx2yx4haast4dlli", 
       "shard": "bagbaiera64rrqwenr7gmw6g2q6r4uchk36nobfnhg2362e6ujsfqoryzntcq"
    }

@dtbuchholz dtbuchholz merged commit cfbfae6 into main Nov 17, 2024
3 checks passed
@dtbuchholz dtbuchholz deleted the dtb/update-go3wup branch November 17, 2024 14:58
@carsonfarmer
Copy link
Member

Hero!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants