Summary: | Garbage instead of html rendering at www.idealista.com | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Raúl <rasasi78> |
Component: | http | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aikurn, andresbajotierra, maksim, rasasi78, zahl |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Rendering and document information (http headers) |
Description
Raúl
2008-08-21 23:51:07 UTC
Forgot to say working on iceweasel/firefox 3.0 and on arora/webkit Hmm.... It's currently refusing connections. I'm seeing garbage too with 4.1.62. I've switched the View Mode to Kate and saved the file as idealista.html. If I open this file with Konqueror I can see a proper page, not garbage. Using KDE 4.1.1 (KDE 4.1.0 (4.1 >= 20080722)) (KDEmod) in ArchLinux i686: I can reproduce this bug Created attachment 26983 [details]
Rendering and document information (http headers)
The problem is that the parser in kio_http's HTTPProtocol::readResponseHeader() seems to somehow decide that the (likely bogus) HTTP-Version: header is a new response type, and that it gets an invalid HTTP version, which makes it ignore the Transfer-Encoding: header. --- http.cpp (revision 847182) +++ http.cpp (working copy) @@ -2745,7 +2745,7 @@ // calling application later m_responseHeaders << QString::fromLatin1(buf); - if ((strncasecmp(buf, "HTTP", 4) == 0) || + if ((strncasecmp(buf, "HTTP/", 5) == 0) || (strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support { if (strncasecmp(buf, "ICY ", 4) == 0) makes it work, and is certainly justifiable but really, the code sucks, so it may make sense to put this into 4.1.x only or something. The above fix committed to 4.1 branch in r860101. trunk has a significant rework of response/header parsing which doesn't suffer from the issue. |