Commit Graph

197 Commits

Author SHA1 Message Date
dougt@netscape.com
a70fce6f87 Revising nsIChannel to allow for overlapped i/o. This consists of three parts:
1. Factoring nsIChannel into a protocol specific part, the nsIChannel, and a socket specific, the nsITransport.
2. Derive the nsIChannel from a nsIRequest.
2. Changes the notification system from necko and the URILoader to pass the nsIRequest interface instead of nsIChannel interface.

This goal stems from wanting to be able to have active AsyncRead and AsyncWrite operations on nsSocketTransport.
This is desired because it would greatly simplify the task of maintaining persistent/reusable socket connections
for FTP, HTTP, and Imap (and potentially other protocols).  The problem with the existing nsIChannel interface is
that it does not allow one to selectively suspend just one of the read or write operations while keeping the other active.

The full details of the change on written up in the netlib newsgroup.

r=darin@netscape.com
sr=rpotts@netscape.com
2001-02-10 00:16:26 +00:00
peterlubczynski@netscape.com
1c2f7ab9ad Allow for a common directory among installs for scanning for plugins bugscape 3863 a=av sr=attinasi 2001-02-07 01:13:01 +00:00
edburns@acm.org
5a4f73e6b6 bug 49336
r=av
sr=waterson

This code makes sure that if the prefs say to USE DIRECT instead of using
a proxy, the plugin sees it that way.
2001-02-03 02:56:28 +00:00
av@netscape.com
79923c8fc3 Bug 61388 -- implementing refresh plugins mechanism without restarting, rs=waterson, r=peterl, a=r=av 2001-02-02 23:48:17 +00:00
edburns@acm.org
142cf59946 bug:66729
sr=waterson
r=akkana
Change PRUint32 to PRInt32.
2001-01-30 20:39:55 +00:00
jdunn@netscape.com
9ecd37ff47 fixing the issue of "delete [] (void*)". This is wrong.
since the pointer was 'newed' as a char *, we need to
delete a (char *)

No bug for this... but very similar to
# 34040
r= cls@seawood.org Joe.Chou@eng.sun.com
2001-01-19 01:52:33 +00:00
rich.burridge@sun.com
b6e40a430b Fix to allow applet doing POST to an https connection over a proxy to work.
r=pollman@netscape.com
sr=waterson@netscape.com
Bugid #60228
2001-01-16 22:53:39 +00:00
peterlubczynski@netscape.com
9e0cc9feef Fix regression. bug 65162 a=av sr=vidur 2001-01-12 23:45:03 +00:00
peterlubczynski@netscape.com
9eb928841a Fix for reading content-type header before using default plugin bug 54437 a=av sr=buster 2001-01-10 23:49:19 +00:00
bryner@uiuc.edu
4a81f27100 Removing dead references to old header files that will be going away for bug 38061. r=jag, sr=cls. 2000-12-29 22:41:22 +00:00
peterlubczynski@netscape.com
2c51f0a671 Set lastModified attribute for a plugin stream b=58134 a=av sr=buster 2000-12-12 01:00:28 +00:00
av@netscape.com
adc67f59c4 Fixing 18568, addidng some QT specific stuff to avoid build errors, patch by johng@corel.com, sr=brendan, r=pollmann a=av 2000-11-30 22:01:45 +00:00
edburns@acm.org
3564236427 bug=40088
r=edburns
sr=shaver
Author = Xiaobin Lu.
2000-11-17 22:22:47 +00:00
bnesse@netscape.com
ec504d60f0 Load the library on all platforms if it hasn't already been loaded. Fix for bug #57885 r=av, sr=waterson. 2000-11-13 18:42:43 +00:00
av@netscape.com
b66ff8dae4 Fixing bug 58095, retrieving right user agent string instead of harcoded one. Goes to the trunk only as per yesterday PDT meeting. r=valeski, r=serge, sr=waterson, a=av 2000-10-31 20:25:19 +00:00
warren@netscape.com
0462ea4ce8 Bug 47207. Backing out logging/PRINTF changes until we can fix stopwatch.h, introduce double parens, etc. 2000-10-28 22:17:53 +00:00
warren@netscape.com
2606b110d2 Fixing printf problem. 2000-10-28 00:40:49 +00:00
warren@netscape.com
cbbf5385d4 Removed extra 0 arg 2000-10-27 23:21:30 +00:00
warren@netscape.com
7730ce0cd3 Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson 2000-10-27 22:43:51 +00:00
peterlubczynski@netscape.com
4a226e748f Get and send plugin MIME type, fix for bug 54205 r=sfraser a=buster 2000-10-17 20:57:36 +00:00
bnesse@netscape.com
c9f3aba3c7 Use same define for all platforms. Fix for bug #45697 r=av, sr=scc, a=rtm++. 2000-10-17 18:04:47 +00:00
edburns@acm.org
dc44e9b650 bug=
a=brendan
r=av

This bug fix makes it so nsPluginHostImp::FindProxyForURL()
honors ProxyAutoConfig settings.

It also cleans things up per Brendan.
2000-10-05 07:58:51 +00:00
av@netscape.com
f3301972f4 Fix for 44692, allowing default plugin guess about mime type by extension, a=mscott 2000-09-22 06:31:29 +00:00
av@netscape.com
1a32c71e21 Fix for 53399, check for null-pointer to avoid crash, by sean, r=av, a=waterson 2000-09-22 06:17:28 +00:00
av@netscape.com
6323b11027 This should fix the redness 2000-09-22 01:48:05 +00:00
av@netscape.com
0a5d96ad36 Fixing #36089. Allowing Mac browse through both 'Plugins' and 'Plug-ins' folders, a=waterson 2000-09-22 00:58:46 +00:00
edburns@acm.org
af3edef261 a=beard, waterson
r=av
bug=52963

Tested on win32.  Tested to build on win32 and solaris.

This patch fixes bug 52963, bug 52965, and bug 52973.

This patch contributed by Stanley Ho <stanley.ho@eng.sun.com>

52963: nsIPluginStreamListener::OnStartBinding isn't always called:

Added new ivar, mStartBinding:

   * Set to PR_TRUE after nsIPluginInstancePeer::OnStartBinding() has
   * been called.  Checked in ::OnStopRequest so we can call the
   * plugin's OnStartBinding if, for some reason, it has not already
   * been called.

52965: Length isn't always set:

  rv = channel->GetContentLength(&length);

  // it's possible for the server to not send a Content-Length.  We should
  // still work in this case.
  if (NS_FAILED(rv)) {
    mPluginStreamInfo->SetLength(-1);
  }
  else {
    mPluginStreamInfo->SetLength(length);
  }

52973: nsIHTTPHeaderListener called before nsIPluginStreamListener::NewStream

This fix required rolling back Andrei Volkov's change to the signature
of nsPluginStreamListenerPeer::SetUpStreamListener().  In order to call
the plugin with the headers before the NewStream is sent, we need the
nsIChannel.

files in this fix:

M modules/plugin/nglsrc/nsPluginHostImpl.cpp
2000-09-20 09:27:54 +00:00
av@netscape.com
b7ff89147f Part of 33105 fix, added option not to show Bad Plugin warning again, r=serge 2000-09-14 23:58:17 +00:00
edburns@acm.org
13cf732a0e r=vidur, av
a=brendan
bug=49525

This simple fix just adds parameters to an existing method in an XPCOM
safe way, by defining a new method at the end of the interface
definition with the additional parameters.

Original method:

    NS_IMETHOD
    GetURL(nsISupports* pluginInst,
           const char* url,
           const char* target = NULL,
           nsIPluginStreamListener* streamListener = NULL,
           const char* altHost = NULL,
           const char* referrer = NULL,
           PRBool forceJSEnabled = PR_FALSE) = 0;

New method:

    NS_IMETHOD
    GetURLWithHeaders(nsISupports* pluginInst,
                      const char* url,
                      const char* target = NULL,
                      nsIPluginStreamListener* streamListener = NULL,
                      const char* altHost = NULL,
                      const char* referrer = NULL,
                      PRBool forceJSEnabled = PR_FALSE,
                      PRUint32 getHeadersLength = 0,
                      const char* getHeaders = NULL) = 0;

I have modified nsPluginHostImpl.h to include this new method, and
modified nsPluginHostImpl.cpp so that its GetURL calls GetURLWithHeaders
with null values for the last two params.

M modules/plugin/public/nsIPluginManager.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginHostImpl.h
2000-09-14 22:57:56 +00:00
edburns@acm.org
ae81174800 a=brendan, ekrock
r=av, sean@beatnik.com
bug=50547

This change allows the plugin to have a greater degree of control over
the plugin lifecycle.  This change makes it possible for the plugin to
tell mozilla:

1. Whether or not they want to allow the browser to cache their
instance.  Default is yes, do allow the browser to cache their instance.

2. If they answer no to 1, that is, no the plugin does not want the
browser to cache their instance, do you want the shutdown calls to be:

a.

          inst->SetWindow(nsnull);
          inst->Stop();
          inst->Destroy();


b.

          inst->Stop();
          inst->Destroy();
          inst->SetWindow(nsnull);

a. is the default.

Please visit the bug to see the patches:

http://bugzilla.mozilla.org/show_bug.cgi?id=50547

Detail:

This fix was requested by Stanley Ho of the Sun Java Plugin Team.  A
conference call between Eric Krock, Andrei Volkov, Sun, Adobe and other
plugin vendors was used to agree on the above solution.

M modules/plugin/public/nsplugindefs.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginViewer.cpp
M layout/html/base/src/nsObjectFrame.cpp
2000-09-14 08:22:31 +00:00
av@netscape.com
16ea5ebff4 Part of 33105 fix, added a method to hsIPluginHost to handle bad plugins, r=serge 2000-09-14 06:03:37 +00:00
rayw@netscape.com
c6334366cb Bug 37275, Changing value of all progids, and changing everywhere a progid
is mentioned to mention a contractid, including in identifiers.

r=warren
2000-09-13 23:57:52 +00:00
edburns@acm.org
3892a7af07 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
scc@mozilla.org
238eba6f61 if you want a pointer to the characters, you're going to have to |.get()| it 2000-09-13 02:48:08 +00:00
edburns@acm.org
e16d1d4412 r=av
a=waterson
bug=51919

This fix makes it so nsIPluginManager::PostURL() works correctly in the
case of a null target and non-null streamListener.

The fix was to add parameters to NewPluginURLStream() for headers and
post data:

   NS_IMETHOD
-  NewPluginURLStream(const nsString& aURL, nsIPluginInstance *aInstance, nsIPluginStreamListener *aListener);
+  NewPluginURLStream(const nsString& aURL, nsIPluginInstance *aInstance,
+                     nsIPluginStreamListener *aListener,
+                     void *aPostData = nsnull, PRUint32 aPostDataLen = 0,
+                     const char *aHeadersData = nsnull,
+                     PRUint32 aHeadersDataLen = 0);

And to add a new method to correctly send the headers to the channel:

+  NS_IMETHOD
+  AddHeadersToChannel(const char *aHeadersData, PRUint32 aHeadersDataLen,
+                      nsIChannel *aGenericChannel);

Files in this fix:

M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginHostImpl.h
2000-09-08 23:58:36 +00:00
morse@netscape.com
c983b2c986 bug 51338, cookie nag box not modal, r=mstoltz 2000-09-07 07:00:36 +00:00
edburns@acm.org
c05e057a42 This was tested on win32, and is known to build on win32 and solaris.
Right now, nsIPluginManager::PostURL() has parameters for
postHeadersLength and postHeaders.  However, nothing is being done with
these parameters.  This bug fix utilizes these params for their intended
purpose: to allow the plugin the ability to add HTTP headers to a POST
data stream.

Important assumptions made by this fix:

* postHeadersLength is the correct length for postHeaders.

* postHeaders is a buffer of headers in the form

  "HeaderName: HeaderValue\r\n"

  each header, including the last, MUST be followed by "\r\n".

To affect this fix I had to modify the following files:

M docshell/base/nsDocShell.cpp
M docshell/base/nsDocShell.h
M docshell/base/nsWebShell.cpp
M modules/plugin/nglsrc/nsPluginViewer.cpp
M docshell/base/nsWebShell.h
M layout/html/base/src/nsObjectFrame.cpp
M modules/plugin/nglsrc/nsIPluginInstanceOwner.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginInstancePeer.cpp
M webshell/public/nsILinkHandler.h

Basically, it involved clearing a path so the headers arguments can make
it down to nsIPluginInstanceOwner::GetURL()'s implementation in
nsObjectFrame.cpp, where an nsIInputStream is made of the headers.
2000-09-05 19:03:56 +00:00
dbaron@fas.harvard.edu
620f2504bb Fixing scc's typo to fix harpoon orange, etc. r=scc 2000-09-04 01:19:36 +00:00
scc@mozilla.org
896cdbf635 we think the fix is in to support the original form, so back to the original form we go 2000-09-04 00:50:50 +00:00
scc@mozilla.org
8624afd8db and here we are, back to square one. 2000-09-03 08:25:02 +00:00
scc@mozilla.org
e9651df320 I'll try anything, now 2000-09-03 03:25:42 +00:00
scc@mozilla.org
0d7933c2d0 OK, nothing has worked yet. It's time to roll out the big guns: |NS_READABLE_CAST| 2000-09-03 02:50:18 +00:00
scc@mozilla.org
ff4c4a672c hack to fix pravda and speedracer bustage 2000-09-03 01:38:38 +00:00
scc@mozilla.org
79c16415e2 hack to fix pravda bustage 2000-09-03 00:25:42 +00:00
edburns@acm.org
eced31d76a bug=36212
a=waterson,av
r=av,waterson

Here is what I believe to be the correct fix.
This post correspondes to the fix,
second iteration attachments.
M modules/plugin/nglsrc/nsIPluginInstanceOwner.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginInstancePeer.cpp
M modules/plugin/nglsrc/nsPluginViewer.cpp
M layout/html/base/src/nsObjectFrame.cpp

This checkin modifies nsIPluginInstanceOwner::GetURL
to have a length parameter for the post data.
2000-08-24 19:49:08 +00:00
jst@netscape.com
3ba32f670e DOM string changes. All nsString& in DOM interfaces (and interfaces needed by DOM implementations) have been changed to nsAReadableString& and nsAWritableString&. String implementation additions (sanctioned by scc) to support DOM needs. Bug 49091. r=vidur,jst,scc 2000-08-23 17:27:06 +00:00
warren@netscape.com
0aaf97b668 Bug 46777. Redesigned stream interfaces to allows stream observers to be decoupled from pipe implementation. Needed for embedding to fix 'spin' problem. r=rpotts,valeski,ruslan 2000-08-22 07:03:33 +00:00
av@netscape.com
0692c95b81 49515, fixing incorrect handling nsPluginInfo struct which prevented
Mac plugins from working, patch by beard, r=av
2000-08-21 21:31:28 +00:00
scc@mozilla.org
dfe9f3655f fixing code that relied on implicit string construction 2000-08-19 21:44:26 +00:00
cltbld@netscape.com
0bc990b9fc Need to declare nsIFile to make WS 5.0 happy -cls 2000-08-19 05:44:34 +00:00