mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-23 10:22:50 +00:00
khttpd: handle percent-encoded path requests
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
38a8076c19
commit
e0dd95c976
1 changed files with 2 additions and 1 deletions
|
@ -198,7 +198,8 @@ void KHTTPD::handleRequest()
|
|||
HttpHeaderParser headerparser;
|
||||
headerparser.parseHeader(request);
|
||||
|
||||
QFileInfo pathinfo(m_directory + QLatin1Char('/') + headerparser.path());
|
||||
const QString normalizedpath = QUrl::fromPercentEncoding(headerparser.path().toAscii());
|
||||
QFileInfo pathinfo(m_directory + QLatin1Char('/') + normalizedpath);
|
||||
// qDebug() << Q_FUNC_INFO << headerparser.path() << pathinfo.filePath();
|
||||
const bool isdirectory = pathinfo.isDir();
|
||||
const bool isfile = pathinfo.isFile();
|
||||
|
|
Loading…
Add table
Reference in a new issue