gecko-dev/modules
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
..
appfilelocprovider Fix for Win95 machines which don't have APP_DATA dir r=racham 2000-09-09 15:31:27 +00:00
calendar updating license boilerplate to xPL v1.1 1999-11-02 06:27:30 +00:00
coreincl updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
edtplug updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
fullsoft updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
libfont updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
libhook updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
libimg Output console warning if chrome images are abusing alpha (8-bit 2000-09-06 04:42:38 +00:00
libjar Fixed error code. 2000-09-12 05:11:11 +00:00
libnls/headers updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
libpref proxy.ssl.connect pref should be always set to true; a=gagan 2000-09-12 21:42:54 +00:00
libreg Fix build for kandrot. Export NR_RegSetBufferSize from libreg. 2000-09-08 03:52:11 +00:00
libtest updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
libutil Removed obsolete REQUIRES variable from every Makefile.in/makefile.win 2000-06-30 08:08:04 +00:00
oji FALSE -> PR_FALSE 2000-09-12 12:44:48 +00:00
plugin a=brendan,av 2000-09-13 07:09:38 +00:00
progress updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
rdf updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
schedulr updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
security Removed cruft. 2000-01-04 22:40:19 +00:00
softupdt updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
xml updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
zlib Change MDDEPDIR to fix a VPATH issue in srcdir builds. 2000-09-12 23:37:16 +00:00
Makefile updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
Makefile.in updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
makefile.win Added new version that's used with new no-libs-pass make on Windows. 1999-11-28 02:48:59 +00:00