Git Product home page Git Product logo

Comments (3)

vinipsmaker avatar vinipsmaker commented on June 26, 2024

As you can see on the doc:

[...] they will be automatically flushed when the first piece of body is written.

This is meant to be an useful abstraction, then I won't change the behaviour. flush() won't help you.

So, if I understood correctly, you cannot use end() because your message has a body and you would like to let the HTTP client to have access to the headers as soon as possible. You could use the writeHead() method taking a Headers object as argument. It's not documented to do that, but it is what it does. I'll leave this bug open until I fix the documentation. Does this solve your problem?

from tufao.

zecke avatar zecke commented on June 26, 2024

That is a neat idea, I didn't look for other writeHead overloads. Unfortunately QNAM seems to only trigger metaDataChanged at the end of all headers. I understand that the issue is in QNAM and it is more than fine if you don't want to provide API to deal with such quirks.

from tufao.

vinipsmaker avatar vinipsmaker commented on June 26, 2024

Unfortunately QNAM seems to only trigger metaDataChanged at the end of all headers

I see.

Another improvement would be to interpret a write(QByteArray()/*empty body*/) as a desire to send the headers. Do you think this would solve your problem?

Also, what Tufão series are you using (0.x, 1.x), then I can deliver the solution for this series first.

from tufao.

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.