-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Multipart Error: unexpected line in Next(), IPFS not reading everything from Part. #2112
Comments
What version of go were you using? I just remembered that the bug was fixed by upgrading to go 1.5.2 |
Compiled ipfs with |
cool, I'll take a look at this. |
I can reproduce this on 0.4.1 and 0.4.2, but not on 0.4.3-rc3, so either:
or
|
Alright, gonna assume we fixed it. Tried building 0.4.3-rc3 with go1.6 (which is what ipfs 0.4.2 was built with) and could not reproduce the issue. |
@whyrusleeping facing same issue in go-ipfs_v0.4.3_linux-amd64. Any help will be appreciated. |
Please update to newer version, 0.4.3 is ancient. |
Found on
dev0.4.0
5bf3a59There are a few issues open that talk about this multipart, but none that I can see address (this might be slightly related to #1688).
Here is a curl request that sometimes fails:
Most commonly this will fail with:
ERROR commands/h: err: multipart: unexpected line in Next(): "wow\r\n" handler.go:265
Results:
But I've also seen it fail on
ERROR commands/h: err: multipart: unexpected line in Next(): "is cool\r\n" handler.go:265
Results:
The basic issue here is someplace IPFS is not reading everything from the part returned by
NextPart
. This results in the next section of themultipart
not being a boundary and, as the error says, we find an unexpectedNextPart
.You can see this by inspecting both of the last Hashs returned in the failures above. Both have a hash of
QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH
Which is
Sometimes I see:
ERROR commands/h: err: multipart: NextPart: http: invalid Read on closed Body handler.go:265
A successful run (no errors) produces:
The text was updated successfully, but these errors were encountered: