Skip to content

Conversation

guialbuquerque5
Copy link

@guialbuquerque5 guialbuquerque5 commented Feb 28, 2025

Change Summary

I encountered this issue when retrying an import request on the next node:
http: ContentLength=3939 with Body length 0.

After reviewing the code, I realized that the request body was being reused across retries. Since the body is closed after the first request, this caused the error.

The fix ensures that the body is copied and re-instantiated for each retry, preventing this issue.

PR Checklist

@guialbuquerque5 guialbuquerque5 changed the title copy body over request retires in a multi-node request copy body over request retries in a multi-node request Feb 28, 2025
haydenhoang added a commit to haydenhoang/typesense-go that referenced this pull request Mar 27, 2025
@kishorenc
Copy link
Member

Thanks, this required a test fix, which has been added in another PR along with these changes.

@kishorenc kishorenc closed this Mar 27, 2025
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.

2 participants