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.


git-svn-id: svn://10.0.0.236/trunk@78153 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2000-09-05 19:03:56 +00:00
parent e85ef40d72
commit f4ed6ebe07
15 changed files with 295 additions and 75 deletions

View File

@@ -100,8 +100,9 @@ public:
NS_IMETHOD CreateWidget(void);
NS_IMETHOD GetURL(const char *aURL, const char *aTarget, void *aPostData,
PRUint32 aPostDataLen);
NS_IMETHOD GetURL(const char *aURL, const char *aTarget,
void *aPostData, PRUint32 aPostDataLen,
void *aHeadersData, PRUint32 aHeadersDataLen);
NS_IMETHOD ShowStatus(const char *aStatusMsg);
@@ -816,7 +817,8 @@ NS_IMETHODIMP pluginInstanceOwner :: CreateWidget(void)
return NS_OK;
}
NS_IMETHODIMP pluginInstanceOwner :: GetURL(const char *aURL, const char *aTarget, void *aPostData, PRUint32 aPostDataLen)
NS_IMETHODIMP pluginInstanceOwner :: GetURL(const char *aURL, const char *aTarget, void *aPostData, PRUint32 aPostDataLen, void *aHeadersData,
PRUint32 aHeadersDataLen)
{
nsresult rv;