Changeset 25796 in webkit


Ignore:
Timestamp:
Sep 28, 2007 11:31:55 AM (17 years ago)
Author:
kmccullo
Message:

WebCore:

Reviewed by Darin.

  • <rdar://5261371> Nothing downloaded when exporting bookmarks from iGoogle web history
  • Implemented IWebHTTPURLResponse::allHeaderFields so that if the content disposition is "attachment" we will download the file instead of display it. Also implemented some missing functionality.
  • platform/network/ResourceResponse.cpp: (WebCore::ResourceResponse::isAttachment):
  • platform/network/ResourceResponse.h:

win:

Reviewed by Darin.

  • <rdar://5261371> Nothing downloaded when exporting bookmarks from iGoogle web history
  • Implemented IWebHTTPURLResponse::allHeaderFields so that if the content disposition is "attachment" we will download the file instead of display it. Also implemented some missing functionality.
  • HTTPHeaderPropertyBag.cpp: Added. (HTTPHeaderPropertyBag::HTTPHeaderPropertyBag): (HTTPHeaderPropertyBag::createInstance): (HTTPHeaderPropertyBag::setResponse): (HTTPHeaderPropertyBag::response): (HTTPHeaderPropertyBag::QueryInterface): (HTTPHeaderPropertyBag::AddRef): (HTTPHeaderPropertyBag::Release): (ConvertFromLPCOLESTR): (ConvertToVariant): (ConvertFromVariant): (HTTPHeaderPropertyBag::Read): (HTTPHeaderPropertyBag::Write):
  • HTTPHeaderPropertyBag.h: Added.
  • Interfaces/IWebHTTPURLResponse.idl:
  • WebKit.vcproj/WebKit.vcproj:
  • WebURLResponse.cpp: (WebURLResponse::allHeaderFields): (WebURLResponse::isAttachment):
  • WebURLResponse.h:
Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r25795 r25796  
     12007-09-27  Kevin McCullough  <kmccullough@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        - <rdar://5261371> Nothing downloaded when exporting bookmarks from iGoogle web history
     6        - Implemented IWebHTTPURLResponse::allHeaderFields so that if the content disposition is "attachment" we will download the file instead of display it. Also implemented some missing functionality.
     7
     8        * platform/network/ResourceResponse.cpp:
     9        (WebCore::ResourceResponse::isAttachment):
     10        * platform/network/ResourceResponse.h:
     11
    1122007-09-27  Mitz Pettel  <mitz@webkit.org>
    213
  • trunk/WebCore/platform/network/ResourceResponse.cpp

    r24372 r25796  
    164164}
    165165
     166bool ResourceResponse::isAttachment() const
     167{
     168    updateResourceResponse();
     169
     170    String value = m_httpHeaderFields.get("Content-Disposition");
     171    int loc = value.find(';');
     172    if (loc != -1)
     173        value = value.left(loc);
     174    value = value.stripWhiteSpace();
     175    return equalIgnoringCase(value, "attachment");
     176}
     177
    166178void ResourceResponse::setExpirationDate(time_t expirationDate)
    167179{
  • trunk/WebCore/platform/network/ResourceResponse.h

    r24372 r25796  
    101101    bool isMultipart() const { return mimeType() == "multipart/x-mixed-replace"; }
    102102
     103    bool isAttachment() const;
     104
    103105    void setExpirationDate(time_t);
    104106    time_t expirationDate() const;
  • trunk/WebKit/win/ChangeLog

    r25784 r25796  
     12007-09-27  Kevin McCullough  <kmccullough@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        - <rdar://5261371> Nothing downloaded when exporting bookmarks from iGoogle web history
     6        - Implemented IWebHTTPURLResponse::allHeaderFields so that if the content disposition is "attachment" we will download the file instead of display it.  Also implemented some missing functionality.
     7
     8        * HTTPHeaderPropertyBag.cpp: Added.
     9        (HTTPHeaderPropertyBag::HTTPHeaderPropertyBag):
     10        (HTTPHeaderPropertyBag::createInstance):
     11        (HTTPHeaderPropertyBag::setResponse):
     12        (HTTPHeaderPropertyBag::response):
     13        (HTTPHeaderPropertyBag::QueryInterface):
     14        (HTTPHeaderPropertyBag::AddRef):
     15        (HTTPHeaderPropertyBag::Release):
     16        (ConvertFromLPCOLESTR):
     17        (ConvertToVariant):
     18        (ConvertFromVariant):
     19        (HTTPHeaderPropertyBag::Read):
     20        (HTTPHeaderPropertyBag::Write):
     21        * HTTPHeaderPropertyBag.h: Added.
     22        * Interfaces/IWebHTTPURLResponse.idl:
     23        * WebKit.vcproj/WebKit.vcproj:
     24        * WebURLResponse.cpp:
     25        (WebURLResponse::allHeaderFields):
     26        (WebURLResponse::isAttachment):
     27        * WebURLResponse.h:
     28
    1292007-09-27  Ada Chan  <adachan@apple.com>
    230
  • trunk/WebKit/win/Interfaces/IWebHTTPURLResponse.idl

    r23357 r25796  
    6464    HRESULT localizedStringForStatusCode([in] int statusCode, [out, retval] BSTR* statusString);
    6565    HRESULT statusCode([out, retval] int* statusCode);
     66    HRESULT isAttachment([out, retval] BOOL* attachment);
    6667}
  • trunk/WebKit/win/WebKit.vcproj/WebKit.vcproj

    r25530 r25796  
    367367                        </File>
    368368                        <File
     369                                RelativePath="..\HTTPHeaderPropertyBag.h"
     370                                >
     371                        </File>
     372                        <File
    369373                                RelativePath="..\MarshallingHelpers.h"
    370374                                >
     
    584588                        <File
    585589                                RelativePath="..\DOMHTMLClasses.cpp"
     590                                >
     591                        </File>
     592                        <File
     593                                RelativePath="..\HTTPHeaderPropertyBag.cpp"
    586594                                >
    587595                        </File>
  • trunk/WebKit/win/WebURLResponse.cpp

    r25272 r25796  
    2929#include "WebURLResponse.h"
    3030
     31#include "HTTPHeaderPropertyBag.h"
    3132#include "MarshallingHelpers.h"
    3233#include "WebLocalizableStrings.h"
     
    357358{
    358359    ASSERT(m_response.isHTTP());
    359     if (headerFields)
    360         *headerFields = 0;
    361     return E_NOTIMPL;
     360    *headerFields = HTTPHeaderPropertyBag::createInstance(this);
     361    return S_OK;
    362362}
    363363
     
    385385    return S_OK;
    386386}
     387
     388HRESULT STDMETHODCALLTYPE WebURLResponse::isAttachment(
     389    /* [retval][out] */ BOOL *attachment)
     390{
     391    *attachment = m_response.isAttachment();
     392    return S_OK;
     393}
     394
    387395
    388396HRESULT STDMETHODCALLTYPE WebURLResponse::sslPeerCertificate(
  • trunk/WebKit/win/WebURLResponse.h

    r25272 r25796  
    8686        /* [retval][out] */ int *statusCode);
    8787
     88    virtual HRESULT STDMETHODCALLTYPE isAttachment(
     89        /* [retval][out] */ BOOL *attachment);
     90
    8891    // IWebURLResponsePrivate
    8992    virtual HRESULT STDMETHODCALLTYPE sslPeerCertificate(
Note: See TracChangeset for help on using the changeset viewer.