Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/accessmanager.cpp
Show First 20 Lines • Show All 414 Lines • ▼ Show 20 Line(s) | 396 | { | |||
---|---|---|---|---|---|
415 | 415 | | |||
416 | request.setRawHeader("Content-Length", QByteArray()); | 416 | request.setRawHeader("Content-Length", QByteArray()); | ||
417 | request.setRawHeader("Connection", QByteArray()); | 417 | request.setRawHeader("Connection", QByteArray()); | ||
418 | request.setRawHeader("If-None-Match", QByteArray()); | 418 | request.setRawHeader("If-None-Match", QByteArray()); | ||
419 | request.setRawHeader("If-Modified-Since", QByteArray()); | 419 | request.setRawHeader("If-Modified-Since", QByteArray()); | ||
420 | request.setRawHeader("x-kdewebkit-ignore-disposition", QByteArray()); | 420 | request.setRawHeader("x-kdewebkit-ignore-disposition", QByteArray()); | ||
421 | 421 | | |||
422 | QStringList customHeaders; | 422 | QStringList customHeaders; | ||
423 | Q_FOREACH (const QByteArray &key, request.rawHeaderList()) { | 423 | const QList<QByteArray> list = request.rawHeaderList(); | ||
424 | for (const QByteArray &key : list) { | ||||
424 | const QByteArray value = request.rawHeader(key); | 425 | const QByteArray value = request.rawHeader(key); | ||
425 | if (value.length()) { | 426 | if (value.length()) { | ||
426 | customHeaders << (QString::fromUtf8(key) + QLatin1String(": ") + QString::fromUtf8(value)); | 427 | customHeaders << (QString::fromUtf8(key) + QLatin1String(": ") + QString::fromUtf8(value)); | ||
427 | } | 428 | } | ||
428 | } | 429 | } | ||
429 | 430 | | |||
430 | if (!customHeaders.isEmpty()) { | 431 | if (!customHeaders.isEmpty()) { | ||
431 | metaData.insert(QStringLiteral("customHTTPHeader"), customHeaders.join(QLatin1String("\r\n"))); | 432 | metaData.insert(QStringLiteral("customHTTPHeader"), customHeaders.join(QLatin1String("\r\n"))); | ||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |