Comments (11)
Its almost as if when calling the parser "(funcall parser data)" returned by "fast-http:make-parser" that it expects all data for all chunks to already be in the stream, which i dont think they arent as its streamed in pieces with cl-async?
It looks like "parse-chunked-body" in fast-http reads the chunk size, then the body, then tries to read the next chunk size right away, which I dont think is there yet from cl-async?
Maybe carrier has to read all the chunked responses first, then call " (funcall parser data)"?
from carrier.
It looks like maybe fast-http is calling the "message-complete" callback when done reading each chunk.
So what happens is it fast-http reads the first chunk it was sent by carrier, then fast-http calls "message-complete" after it finishes reading the first chunk, which calls carrier's "our-finish-callback" which finishes the request. Maybe?
from carrier.
Yeah, maybe something weird is going on with fast-http. I'll run a few tests...do you have a simple test case you're been using (like a URL you're requesting)? If not I'll try to reproduce via wookie.
from carrier.
No sadly, the only uri I have that is even does chunked (and only sometimes) is our authentication system. I googled around to see if I could find a public one that used chunking and couldn't find one.
Let me know what you find out or if I can be of any help ;)
from carrier.
I made a simple chunked test in wookie, and i'm able to reproduce. Looks like a fast-http bug.
from carrier.
Indeed, I wrote a simple test case and it appears to be a fast-http bug: fukamachi/fast-http#10.
from carrier.
Ok, this should be fixed in the latest fast-http, be sure to do a pull there. Let me know if you have problems. Leaving open until I hear back!
from carrier.
Thanks again for all the help.
Im getting this error now, here is the code:
(as:with-event-loop ()
(asf:alet ((mine (carrier:request "http://localhost:8888/test/test_es.docx" :return-body t)))
(format t "~%mine: ~s~&" mine)))
Expectation failed: NIL
[Condition of type FAST-HTTP.PARSER::EXPECT-FAILED]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] Abort thread (#<THREAD "new-repl-thread" RUNNING {1008A85003}>)
Backtrace:
0: (FAST-HTTP.PARSER::PARSE-CHUNKED-BODY #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument>)
1: (FAST-HTTP.PARSER:PARSE-RESPONSE #<unavailable argument> #<unavailable argument> #<unavailable argument> :START #<unavailable argument> :END #<unavailable argument>)
But, this works
(as:with-event-loop ()
(asf:alet ((mine (carrier:request "http://localhost:8888/test/test_es.txt" :return-body t)))
(format t "~%mine: ~s~&" mine)))
Both appear to be chunked.
from carrier.
It may be fixed at fukamachi/fast-http#11. Could you try it again with the latest fast-http?
from carrier.
yep that fixed it ;)
from carrier.
👍
from carrier.
Related Issues (19)
- ssl uri sometime work sometimes dont HOT 1
- errors with latest quicklisp HOT 5
- Unbound variable and function HOT 1
- Test against httpbin
- HTTP request returning nil HOT 4
- Parses urls incorrectly HOT 2
- Certain SSL sites don't work HOT 4
- Allow for streaming request body
- Doesnt handle query strings HOT 2
- Issue with `location` in response headers being a relative path
- Any reasons not to use this for AWS SDK? HOT 7
- Reusing SSL Context
- cookie support HOT 6
- ssl causes faults on sbcl HOT 20
- Multiple issues when using latest quicklisp and carrier master
- Multiple issues when using latest quicklisp and carrier master HOT 11
- hangs when cannot connect HOT 13
- Can we add this project to quicklisp? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carrier.