bantherewind / cinder-protocol Goto Github PK
View Code? Open in Web Editor NEWImplementation of various network protocols for Cinder
Implementation of various network protocols for Cinder
If the header is bigger than 512 (bytes?), the size of the buffer I thinks, then it only parses it partialy. If Conten-Length is not foeund then it doesn't even keep reading to get the body part.
For now I just hack my way arround this, but it would be great if the HttpResponse::parseHeader sets mHasHeader to true only if it reaches the end of a header and appends the remaining in subsequent passes.
This is the kind of response I'm getting from a Laravel(php) service:
First response
HTTP/1.1 200 OK
Date: Wed, 19 Jul 2017 09:13:30 GMT
Server: Apache/2.4.26 (Win32) OpenSSL/1.0.2l PHP/7.1.7
X-Powered-By: PHP/7.1.7
Cache-Control: no-cache, private
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 9
Set-Cookie: XSRF-TOKEN=eyJpdiI6IjdLSHdwTU1DTTI3UUh1VjFuNDlBd1E9PSIsInZhbHVlIjoiemN0WXR1NThRc0hpMjlUSkhBRVNaTFVKcUlzeG5VZ3NaUTFlUlAxcGtwQXJXSWdMejRWVXBPc0xIM3ZYMjZERStqbjlxXC9DdUphVncwWU5hKzlxdXJBPT0iLCJtYWMiOiJhMTdiZmI1YmYzNDM4YmNlOWRlMGU5M2U5ZjNjZWI5OGY2ODFjMWYwNzA3N2ViODEwMTI4MmI5NGMxZmQxMjF
In a second pass
hIn0%3D; expires=Wed, 19-Jul-2017 11:13:31 GMT; Max-Age=7200; path=/
Set-Cookie: laravel_session=JCCr9pQ7G3K2xqccFZllgJHNRGo45HiMSQs18yvz; expires=Wed, 19-Jul-2017 11:13:31 GMT; Max-Age=7200; path=/; HttpOnly
Content-Length: 71
Content-Type: text/json; charset=UTF-8
{"code":0,"data":"viMZYFp1qfRSZtyX9ISBb1uA5KJjxclTgm7OK05D","error":[]}
The Set-Cookie line gets broken, tha might be dificutl for the parser to handle, but I'll dig into it later.~
Hey there! First off, thanks for writing the ASIO wrapper and providing all the protocol examples. These have been super helpful. We've been using some of these within our apps and would like to release a block that depends on the HttpRequest implementation. Would you be open to transitioning this repo to a Cinder block to make it easier to include as a dependency?
I saw that @kitschpatrol has a fork ready with the necessary changes that might be a good starting point. I'd be happy to create a PR, but wanted to hear your thoughts on it first.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.