Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/qhttpconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int QHttpConnection::HeadersComplete(http_parser *parser)
Q_ASSERT(theConnection->m_request);

/** set method **/
QString method = QString::fromAscii(http_method_str((enum http_method) parser->method));
QString method = QString::fromLatin1(http_method_str((enum http_method) parser->method));
theConnection->m_request->setMethod(method);

/** set version **/
Expand Down Expand Up @@ -192,7 +192,7 @@ int QHttpConnection::HeaderField(http_parser *parser, const char *at, size_t len
theConnection->m_currentHeaderValue = QString();
}

QString fieldSuffix = QString::fromAscii(at, length);
QString fieldSuffix = QString::fromLatin1(at, length);
theConnection->m_currentHeaderField += fieldSuffix;
return 0;
}
Expand All @@ -202,7 +202,7 @@ int QHttpConnection::HeaderValue(http_parser *parser, const char *at, size_t len
QHttpConnection *theConnection = (QHttpConnection *)parser->data;
Q_ASSERT(theConnection->m_request);

QString valueSuffix = QString::fromAscii(at, length);
QString valueSuffix = QString::fromLatin1(at, length);
theConnection->m_currentHeaderValue += valueSuffix;
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/qhttpresponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void QHttpResponse::writeHeaders()
}
//TODO: Expect case

m_connection->writeHeader(name.toAscii(), value.toAscii());
m_connection->writeHeader(name.toLatin1(), value.toLatin1());
}

if( !m_sentConnectionHeader )
Expand Down Expand Up @@ -130,7 +130,7 @@ bool QHttpResponse::writeHead(int status)
qDebug() << "Invalid status code"<<status;
return false;
}
m_connection->write(QString("HTTP/1.1 %1 %2\r\n").arg(status).arg(codes.value(status)).toAscii());
m_connection->write(QString("HTTP/1.1 %1 %2\r\n").arg(status).arg(codes.value(status)).toLatin1());

writeHeaders();

Expand Down