Code Monkey home page Code Monkey logo

Comments (7)

bablukid avatar bablukid commented on July 26, 2024 1

same problem here, tink_http ( PHP7 target ) throws the same error when acessing Google Geocoding API ( i.e "https://maps.googleapis.com/maps/api/geocode/json?address=Place%20de%20l%27%C3%A9toile%20Paris" )

Error#500: Chunked encoding is not supported and the content-length header is required. @ tink.http.clients.SocketClient.request:74

from tink_http.

kevinresol avatar kevinresol commented on July 26, 2024

was trying to implement OutgoingResponse.chunked(). It turns out that nodejs uses chunked encoding by default, meaning that one doesn't need to set content-length nor transfer-encoding header. Simply write() to the ServerResponse object and end() it, nodejs will take care of the rest (adda transfer-encoding: chunked header and sends body in chunked style).

So if we transform the body into "chunked style" and send through nodejs, it will be shown "as-is" on the receiver side.

So I mean this should probably be handled at container level

from tink_http.

back2dos avatar back2dos commented on July 26, 2024

So I mean this should probably be handled at container level

Yes and no. First, there should be a standalone functionality that is of type IncomingRequestHeader->OutgoingReponse->OutgoingResponse that is able to fix a response so that makes sure the content-length, transfer-encoding and connection headers fit with one another and what the client supports (e.g. support for chunked responses must be announced by the client IIRC, otherwise connection: closed must be used).

from tink_http.

0b1kn00b avatar 0b1kn00b commented on July 26, 2024

Wait, Why are both these issues closed?

from tink_http.

back2dos avatar back2dos commented on July 26, 2024

Which ones? ^^

from tink_http.

0b1kn00b avatar 0b1kn00b commented on July 26, 2024

Regarding SocketClient not supporting chunked responses. Got bogged down with the Chunked implementation thus far.

from tink_http.

kevinresol avatar kevinresol commented on July 26, 2024

chunked encoding is not implemented in the SocketClient right now, and this issue is an umbrella covering that and all other chunk-related things.

from tink_http.

Related Issues (20)

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.