tufao
0.8.1
An asynchronous web framework for C++ built on top of Qt
|
This class provides a handler to internally (only seen by your application) rewrite the URL. More...
Public Slots | |
bool | handleRequest (Tufao::HttpServerRequest *request, Tufao::HttpServerResponse *response, const QStringList &=QStringList()) |
Changes the request url and returns false. More... | |
Public Slots inherited from Tufao::AbstractHttpServerRequestHandler | |
virtual bool | handleRequest (Tufao::HttpServerRequest *request, Tufao::HttpServerResponse *response, const QStringList &args=QStringList())=0 |
Handles the request using the response object. More... | |
Public Member Functions | |
UrlRewriterHandler (const QByteArray &url, QObject *parent=0) | |
Constructs a UrlRewriterHandler object. More... | |
void | setUrl (const QByteArray &url) |
Sets the URL that will replace the old URL to url . | |
QByteArray | url () const |
Returns the url used to replace the old URLs. | |
~UrlRewriterHandler () | |
Destroys the object. | |
Public Member Functions inherited from Tufao::AbstractHttpServerRequestHandler | |
AbstractHttpServerRequestHandler (QObject *parent=0) | |
Constructs an AbstractHttpServerRequestHandler object. | |
This class provides a handler to internally (only seen by your application) rewrite the URL.
One place where this technique is useful is when you want to use one file to handle the root page of your site through HttpFileServer. This example is illustrated in the image below:
|
explicit |
Constructs a UrlRewriterHandler object.
parent
is passed to the QObject constructor.
url
will be the new url.
|
slot |
Changes the request
url and returns false.
This method doesn't do anything else.