-
Notifications
You must be signed in to change notification settings - Fork 79
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
Error=Parsed fewer bytes than were passed to the HTTP parser #312
Comments
FYI -> I have an answer from the ibm cloud slack community
|
Today I encountered the same problem on my own Kitura-net Fork. The only workaround for now was to specify HTTP 1.0 instead of HTTP 1.1 because HTTP 1.0 does not return chunked format. I know this is only a temporary solution, but it works for me currently (still in development, not in production) Note: |
I will definitely try it! I have still no other solution for this. |
I had this issue a while back too. The same error message. My solution was to use Ubuntu 16.04. I ran into this issue on Ubuntu 18.04. I am still working on Ubuntu 16.04 so not sure if the issue still occurs with 18.04. Another reference to this issue is: #312 |
I had the same problem. I exported the KITURA_NIO=1 as suggested in this post and started using NIO package instead of Kitura net package. That picks the correct version of curl libs i guess. |
Hi guys,
I have a very strange problem with my Kitura app. The problem occurs when fetching data from my Cloudant DB with the queryByView function from Kitura-CouchDB -> https://github.com/IBM-Swift/Kitura-CouchDB/blob/master/Sources/CouchDB/Database.swift#L295
I created the issue here because it seems like the problem is in this function -> https://github.com/IBM-Swift/Kitura-net/blob/master/Sources/KituraNet/ClientRequest.swift#L568
From the server logs I get this error message
[2019-11-12T20:19:47.420Z] [ERROR] [ClientRequest.swift:531 end(close:)] ClientRequest error. Failed to parse response. Error=Parsed fewer bytes than were passed to the HTTP parser
The CouchDB request looks like this ->
curl -H "Authorization: Bearer AUTH_TOKEN" --globoff "https://2551a1eb-7c0f-41ba-b250-a43a534327ad-bluemix.cloudant.com/my_database/_design/boxes/_view/events?startkey=[\"3B6EC126-7C3B-4E7D-A900-E47A7D7771AC\",\"2019-11-08T15:52:07.432+0000\"]&endkey=[\"3B6EC126-7C3B-4E7D-A900-E47A7D7771AC\",\"2019-11-08T22:37:05.931+0000\"]&include_docs=true" -X GET
So the strange thing about that issue is that it only occurs when the requested CouchDB Document is a bit bigger (for example around 47729 chars). For a small doc (for example around 3000 chars) it works. And to make confusion perfect, it only occurs when running the app as an Cloud Foundry-App and not when running it locally. Locally everything is fine.
Do you have any idea what is going wrong here? I am slowly despairing...
Best
Marcel
The text was updated successfully, but these errors were encountered: