Ignore:
Timestamp:
Apr 12, 2007, 9:32:51 PM (18 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by Darin Adler.

http://bugs.webkit.org/show_bug.cgi?id=13029
rdar://problem/4994849
Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
This doesn't actually change JavaScriptCore, but that's where npapi.h is.

  • bindings/npapi.h: Add headers member to NPStream struct. Also increase NP_VERSION_MINOR to 18. Increasing to >= 17 allows plug-ins to safely detect whether to look for NPStream::headers. Increasing from 17 to 18 reflects presence of NPObject enumeration, which was added in a prior patch, and which has been agreed to constitute version 18 by the plugin-futures list. Also add other missing bits of npapi.h to catch up from 14 to 18. This includes features that are not implemented in WebKit, but those are safely stubbed.

LayoutTests:

Reviewed by Darin Adler.

http://bugs.webkit.org/show_bug.cgi?id=13029
rdar://problem/4994849
Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.

  • http/tests/plugins/npapi-response-headers-expected.txt: Added.
  • http/tests/plugins/npapi-response-headers.html: Added.
  • http/tests/plugins/resources/load-me-1.txt: Added.
  • http/tests/plugins/resources/load-me-2.txt: Added.

WebKit:

Reviewed by Darin Adler.

http://bugs.webkit.org/show_bug.cgi?id=13029
rdar://problem/4994849
Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.

  • Plugins/WebBaseNetscapePluginStream.h: declarations.
  • Plugins/WebBaseNetscapePluginStream.mm: main implementation. (-[WebBaseNetscapePluginStream dealloc]): cleanup. (-[WebBaseNetscapePluginStream finalize]): cleanup. (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): Pass headers along. (-[WebBaseNetscapePluginStream startStreamWithResponse:]): Main work is here. Extract headers from NSHTTPURLResponse object into a byte sequence. See comments here about how it would be nice to have low-level access to the HTTP response. (-[WebBaseNetscapePluginStream _destroyStream]): cleanup.
  • Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Conform to new startStream params. Not applicable here, pass nil.

WebKitTools:

Reviewed by Darin Adler.

http://bugs.webkit.org/show_bug.cgi?id=13029
rdar://problem/4994849
Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
Changes in WebKitTools are only for the NPAPI test plugin.

  • DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: main test logic. (pluginInvoke): support null window argument for NPStream creation. (pluginAllocate): initialization. (pluginDeallocate): cleanup. (handleCallback): add second JS callback arg: header dump. (notifyStream): added; hook from NPP_NewStream to record headers.
  • DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: declarations.
  • DumpRenderTree/TestNetscapePlugIn.subproj/main.c: call new header hook. (NPP_NewStream): call new header hook.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r20835 r20867  
    13901390                        isa = PBXProject;
    13911391                        buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
    1392                         compatibilityVersion = "Xcode 2.4";
    13931392                        hasScannedForEncodings = 1;
    13941393                        mainGroup = 0867D691FE84028FC02AAC07 /* JavaScriptCore */;
     
    13961395                        projectDirPath = "";
    13971396                        projectRoot = "";
    1398                         shouldCheckCompatibility = 1;
    13991397                        targets = (
    14001398                                932F5BE30822A1C700736975 /* All */,
Note: See TracChangeset for help on using the changeset viewer.