blob: 318fd13ac395c6bd65f597f95a328ec961f9354b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2019 Mikhail Svetkin <mikhail.svetkin@gmail.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qhttpserverliterals_p.h"
#include <QtCore/qbytearray.h>
QT_BEGIN_NAMESPACE
// Don't use QByteArrayLiteral, as this library may be unloaded before all
// references to the data are destroyed - by allocating on the heap, the last
// user will free the data instead of referencing unloaded data
QByteArray QHttpServerLiterals::contentTypeXEmpty()
{
static QByteArray ba("application/x-empty");
return ba;
}
QByteArray QHttpServerLiterals::contentTypeTextHtml()
{
static QByteArray ba("text/html");
return ba;
}
QByteArray QHttpServerLiterals::contentTypeJson()
{
static QByteArray ba("application/json");
return ba;
}
QT_END_NAMESPACE
|