gecko-dev/modules/plugin
edburns%acm.org 61f79884f1 a=brendan,av
r=av
bug=50811

This bug fix was suggested by Stanley Ho <stanley.ho@eng.sun.com>.

Stanley proposed we overload the meaning of the nsIPluginStreamListener
argument to nsIPluginManager::{GetURL,PostURL}() so that it also may
implement an interface for reading headers.  Thus, the browser could QI
the plugin's nsIPluginStreamListener instance to this headers reading
interface and send the plugin the headers from the response.

I have implemented Stanley's above proposal.  I have defined a new
interface, nsIHTTPHeaderListener.idl with one method:

  /**

   * Called for each HTTP Response header.

   * NOTE: You must copy the values of the params.

   */

  void newResponseHeader(in string headerName, in string headerValue);

To affect this fix, I have added a new private method

nsPluginStreamListenerPeer::
ReadHeadersFromChannelAndPostToListener(nsIHTTPChannel *httpChannel,
                                        nsIHTTPHeaderListener *listener)

Then, modified nsPluginStreamListenerPeer::OnDataAvailable() to call
this method BEFORE reading the content data.  However, this fix makes
two important assumptions I would like to check out:

   * Assumption

   * By the time nsPluginStreamListenerPeer::OnDataAvailable() gets
   * called, all the headers have been read.

       * Assumption:

       * The return value from nsIHTTPHeader->{GetFieldName,GetValue}()
       * must be freed.

The following files are included in this fix:

A modules/plugin/public/nsIHTTPHeaderListener.idl
A modules/plugin/public/makefile.win
A modules/plugin/public/Makefile.in
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
2000-09-13 07:09:38 +00:00
..
bad Removed reference to nsIBaseStream 2000-08-22 09:50:45 +00:00
base a=brendan,av 2000-09-13 07:09:38 +00:00
default/windows Fixing 46573, r=serge 2000-08-02 21:35:45 +00:00
macbuild bug #50811, a=brendan, on behalf of edburns@sun.com 2000-09-13 06:45:33 +00:00
mpdk Removing binary 2000-05-16 06:01:46 +00:00
nglsrc a=brendan,av 2000-09-13 07:09:38 +00:00
public a=brendan,av 2000-09-13 07:07:18 +00:00
samples Further tweak to 39933. 2000-08-23 00:24:07 +00:00
SanePlugin Removed obsolete REQUIRES variable from every Makefile.in/makefile.win 2000-06-30 08:08:04 +00:00
src Removed obsolete REQUIRES variable from every Makefile.in/makefile.win 2000-06-30 08:08:04 +00:00
test Further tweak to 39933. 2000-08-23 00:24:07 +00:00
tools/mpdk Removing binary 2000-05-16 06:01:46 +00:00
.cvsignore
Makefile.in This test relies on GTK libraries and header files, it is not 2000-07-17 13:06:50 +00:00
makefile.win #43500, making the default plugin part of the build on Windows, r=pollmann 2000-07-05 22:51:34 +00:00