Details
-
Epic
-
Resolution: Unresolved
-
P2: Important
-
5.10
-
Finalisation of Lightweight HTTP server
Description
Provide a framework for an HTTP server with the following main applications:
- make it easy for developers to expose some Qt application functionality through REST APIs
- support integration of WebAssembly and UI remoting technologies (such as WebGL) into Qt
- make devices built with Qt configurable or remote-controlled via HTTP
Initial Version
The main feature of the initial version of the framework is to provide routing as per HTTP 1.1, and access to response and request objects through C++ and QML APIs, while maintaining a small footprint. The framework is extensible through C++ subclassing of the respective abstract and interface classes.
Basic functionality
- HTTP 1.1 standard compliant handling of requests and responses
- access to the HTTP request and response properties (verb/method, headers, body) through a convenient API
- routing with type checking and implicit conversion (
QTBUG-60106) - error handling with custom error response
- support for websockets
Scalability and concurrency
- single-threaded, event driven by default
- reentrant framework
- multithreaded response handling by subclassing QTcpServer is possible
Security
- support for encryption via HTTPS (should be default)
- basic authentication possible through access to HTTP header (QTBUG-60109)
Support for operators
- runtime-configurable logging
- rate limiting (in addition to QTcpServer::setMaximumPendingConnections; might need more functionality in the network stack to prevent flooding/DDoS/brute-forcing)
Future releases
Features we are considering
- template engine
- support for WebDAV
- object-relational mapping
- configuration through config files
- certificate management/server-side of TLS handshake
- support for Cross-Origin Resource Sharing (CORS)
- HTTP/2
- client authentication/client certificates/2-sided TLS
- Range requests ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests )
Technologies to be researched
- how to integrate with a reverse proxy (nginx, wsgi)
- working with API gateway technologies (swagger etc)
- QUIC
- JSON-RPC
Documentation:
It Would be great if some detailed README is there which states how it can be build used,.
Attachments
Issue Links
- depends on
-
QTBUG-74843 QHttpServer HTTP chunked request body handling
- Closed
-
QTBUG-60106 HTTP server routing
- Closed
- is required for
-
QTBUG-98086 Connected First
- Open
-
QTBUG-73668 Headless and remote UI in embedded
- Withdrawn
-
QTBUG-73397 WSS (Web Secure Sockets) for WebGL
- Open
-
QTBUG-74796 Doc: Consider qhttpd as back-end in Creator
- Closed
-
QTCREATORBUG-22400 Qt for Webassembly client/server project wizard in Qt Creator
- Blocked
- relates to
-
QTCREATORBUG-21198 Enable WebAssembly app deployment from an embedded B2Qt device to a standard browser
- Withdrawn