http api: makes sure header is sent even when r is not ready yet. fixes #3304#3305
http api: makes sure header is sent even when r is not ready yet. fixes #3304#3305whyrusleeping merged 4 commits intoipfs:masterfrom
Conversation
License: MIT Signed-off-by: Jan Winkelmann <j-winkelmann@tuhh.de>
whyrusleeping
left a comment
There was a problem hiding this comment.
Great catch, this should fix quite a few 'apparent' hanging issues. Just one change then LGTM
| } | ||
| for { | ||
| // flush to send header when r is not ready yet | ||
| f.Flush() |
There was a problem hiding this comment.
probably want to check and handle the error here, just in case
There was a problem hiding this comment.
Flush doens't return an error, that's why the tests failed :D
License: MIT Signed-off-by: Jan Winkelmann <j-winkelmann@tuhh.de>
|
I now check the error. Also I removed the flush at the bottom of the loop so it doesn't flush pointlessly. |
|
Tests are failing now... i'm guessing removing that final flush wasnt quite right |
License: MIT Signed-off-by: Jan Winkelmann <j-winkelmann@tuhh.de>
License: MIT Signed-off-by: Jan Winkelmann <j-winkelmann@tuhh.de>
|
Can you squash it, we don't want to have any commits with build/test failures as it makes git bisecting much harder. |
|
@Kubuxu uh, sorry. next time! |
* commit '6f3ae5da293f971c09e3e6fc0763aeca04ba98d3': rename DataSize to FileSize update HashOnRead validation to properly support cids http api: makes sure header is sent even when r is not ready yet. fixes ipfs#3304 (ipfs#3305) fix add/cat of small files raw dag: make raw nodes work in cat and get, add tests feat: make metrics injection log an error instead of warning test: check if metrics work in sharness Fix metrics being injected after node initalization unixfs: allow use of raw merkledag nodes for unixfs files ds-help: add helper func to convert from Cid to DsKey and the reverse cli: refactor to expose argument parsing functionality # Conflicts: # core/commands/add.go
Otherwise API clients block on pubsub subscriptions until the first packet is sent (see, well, #3304).