[Qt-interest] QtWebKit content-type support
Thiago Macieira
thiago at kde.org
Tue Oct 27 21:13:25 CET 2009
Em Terça-feira 27. Outubro 2009, às 20.53.01, Joel A. Iturra P. escreveu:
> Hi David,
>
> Looking for one rapid solution, I do this "temporal patch" that it seems
> to work.
>
> File:
> qt-x11-opensource-src-4.5.2/src/network/access/qnetworkrequest.cpp
>
> Method:
> void QNetworkHeadersPrivate::parseAndSetHeader(const QByteArray &key,
> const QByteArray &value);
>
>
> --- qt-x11-opensource-src-4.5.2/src/network/access/qnetworkrequest.cpp
> 2009-06-20 00:57:57.000000000 -0400
> +++
> qt-x11-opensource-src-4.5.2-atentus/src/network/access/qnetworkrequest.cpp
> 2009-10-27 12:30:10.000000000 -0300
>
> @@ -757,7 +757,7 @@
> if (value.isNull())
> cookedHeaders.remove(parsedKey);
> else
> - cookedHeaders.insert(parsedKey,
> parseHeaderValue(parsedKey, value));
> + cookedHeaders.insert(parsedKey,
> parseHeaderValue(parsedKey, value.toLower()));
> }
> }
>
>
> But I do not know if this can cause any bad behavior in other context.
>
> How can I test or get help for this ?
That's the wrong place. You're lowercasing all values in HTTP headers. They
are not guaranteed to be all case-insensitive.
You should find in QtWebKit where it tries to see if it's a MIME type it can
handle. That's where the lowercasing is missing.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091027/c8f20475/attachment.bin
More information about the Qt-interest-old
mailing list