-
Notifications
You must be signed in to change notification settings - Fork 292
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 #495: Hijack proxy /add correctly. Disable keep-alives. #505
Conversation
No more hacks around /add. This uses the local adder when hijacking /add. It supports the parameters and works pretty well with the ipfs CLI, showing progress and everything. License: MIT Signed-off-by: Hector Sanjuan <[email protected]>
License: MIT Signed-off-by: Hector Sanjuan <[email protected]>
This uses Join rather than PeerAdd. Join ensures a DHT bootstrap after successfully joining. License: MIT Signed-off-by: Hector Sanjuan <[email protected]>
License: MIT Signed-off-by: Hector Sanjuan <[email protected]>
See discussion in ipfs/kubo#5168 We cannot stream responses with keep-alives enabled. I prefer this to not be a client feature, as otherwise users might end up shooting themselves in the foot. Note, the price is a corrupted request body which gets added normally and gives wrong hashes! License: MIT Signed-off-by: Hector Sanjuan <[email protected]>
8d52f1e
to
be651da
Compare
Related to why we need to disable keep alives for adding to work correctly: ipfs/kubo#5168 |
@@ -0,0 +1,68 @@ | |||
// Package adderutils provides some utilities for adding content to cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I not sure this really requires being in its own utils package... Unless I am missing an import cycle, I believe this could simply be a function in the adder
package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, import cycle :(. adder[utils] -> local
-> adder
No more hacks around /add. This uses the local adder when hijacking /add.
It supports the parameters and works pretty well with the ipfs CLI, showing
progress and everything.
#495