Commit 95e1ba28 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[BlackBerry] In RSSFilterStream, don't swallow headers when there's no body

https://bugs.webkit.org/show_bug.cgi?id=113334

Patch by Joe Mason <jmason@blackberry.com> on 2013-03-26
Reviewed by Rob Buis.

RIM PR 316345

When receiving an HTTP response that has a Content-Type header such as text/xml, but no
body, RSSFilterStream::notifyHeadersReceived reads the Content-Type as "potential RSS", and
calls saveHeaders. It expects to sniff the body in notifyDataReceived to see if it's RSS,
and then call sendSavedHeaders to pass on the headers. But since there is no body,
notifyDataReceived is never called. So call sendSavedHeaders in notifyClose too (it will not
send them again if they were already sent.)

* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::RSSFilterStream::notifyClose):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent db5d7e2f
2013-03-26 Joe Mason <jmason@blackberry.com>
[BlackBerry] In RSSFilterStream, don't swallow headers when there's no body
https://bugs.webkit.org/show_bug.cgi?id=113334
Reviewed by Rob Buis.
RIM PR 316345
When receiving an HTTP response that has a Content-Type header such as text/xml, but no
body, RSSFilterStream::notifyHeadersReceived reads the Content-Type as "potential RSS", and
calls saveHeaders. It expects to sniff the body in notifyDataReceived to see if it's RSS,
and then call sendSavedHeaders to pass on the headers. But since there is no body,
notifyDataReceived is never called. So call sendSavedHeaders in notifyClose too (it will not
send them again if they were already sent.)
* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::RSSFilterStream::notifyClose):
2013-03-26 Dmitry Zvorygin <zvorygin@chromium.org>
 
Web Inspector: Faster drawer animation.
......@@ -501,10 +501,17 @@ void RSSFilterStream::notifyDataReceived(BlackBerry::Platform::NetworkBuffer* bu
void RSSFilterStream::notifyClose(int status)
{
// If there was no data, we might get here with the type still unknown. No data at all -> no RSS
// data.
if (m_resourceType == TypeUnknown)
m_resourceType = TypeNotRSS;
if (isRSSContent(m_resourceType))
handleRSSContent();
else
else {
sendSavedHeaders();
FilterStream::notifyClose(status);
}
}
bool RSSFilterStream::convertContentToHtml(std::string& result)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment