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.
This commit is contained in:
@@ -1484,7 +1484,7 @@ NS_IMETHODIMP nsPluginHostImpl::GetURL(nsISupports* pluginInst,
|
||||
else if (0 == PL_strcmp(target, "_current"))
|
||||
target = "_self";
|
||||
|
||||
rv = owner->GetURL(url, target, nsnull, 0);
|
||||
rv = owner->GetURL(url, target, nsnull, 0, nsnull, nsnull);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
@@ -1549,7 +1549,8 @@ NS_IMETHODIMP nsPluginHostImpl::PostURL(nsISupports* pluginInst,
|
||||
else if (0 == PL_strcmp(target, "_current"))
|
||||
target = "_self";
|
||||
}
|
||||
rv = owner->GetURL(url, target, (void*)postData, postDataLen);
|
||||
rv = owner->GetURL(url, target, (void*)postData, postDataLen,
|
||||
(void*) postHeaders, postHeadersLength);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
|
||||
Reference in New Issue
Block a user