Comments (3)
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.
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.
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)
- Data is truncated when using WebSocket to transfer data over 128k HOT 2
- can't link apps in debug mode on VS HOT 6
- apps hang when linked to wrong library configuration on VS
- problem using HttpServerRequestRouter with Visual Studio HOT 2
- typo in httpserverrequestrouter.cpp
- Only the first cookie is considered HOT 1
- doc: ldconfig after install HOT 1
- Move news section from README.md to CHANGELOG.md
- Add some more shields from Shields.io
- SIGSEGV when using int HttpServerRequestRouter::map(std::initializer_list<Mapping> map) HOT 1
- Socket stops to accept connexion
- Loop parsing POST contains request with two "readyRead" HOT 5
- websocket transform large data data loss HOT 2
- Remove an unnecessary null pointer check HOT 1
- Create Conan package
- Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers. HOT 1
- server close connection after server response client HOT 2
- How to interact with HTML file
- incoming urls with # i.e http://localhost/#index.html HOT 4
- What is the maximum amount of data for a single transfer? HOT 7
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 tufao.