Code Monkey home page Code Monkey logo

cinder-protocol's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cinder-protocol's Issues

Issue parsing big header

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.~

Transition to cinder block?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.