Correct libcurl crash when downloading local files.
authorbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Aug 2009 22:06:00 +0000 (22:06 +0000)
committerbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Aug 2009 22:06:00 +0000 (22:06 +0000)
commitfa4456af3a155519fa8e8d694883c21e12aca85b
treeb6782651ea93da8a9d201fe0dc19649cce7c3e77
parenta1883c5fa1d75a4ca70755f3002e6efd377d54be
Correct libcurl crash when downloading local files.
https://bugs.webkit.org/show_bug.cgi?id=28312

Reviewed by Kevin Ollivier.

No new tests. Test is covered by fast/encoding/char-encoding-mac.html.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::handleLocalReceiveResponse): New static function that
  performs the local setting of valid URL and firing didReceiveResponse.
  This code was moved from writeCallback.
(WebCore::writeCallback): Move local file handling to static function
  (above) and use the function instead.
(WebCore::readCallback): Add check
  for responseFired, and handle as a local file if it was not.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@47299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/platform/network/curl/ResourceHandleManager.cpp