Closed
Bug 51919
Opened 25 years ago
Closed 25 years ago
Plugin POST incorrectly implemented
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: edburns, Assigned: edburns)
References
Details
Attachments
(3 files)
|
8.51 KB,
patch
|
Details | Diff | Splinter Review | |
|
7.92 KB,
patch
|
Details | Diff | Splinter Review | |
|
23.20 KB,
application/octet-stream
|
Details |
When I checked in the initial fix to 36212, I misunderstood the way it was
supposed to work, which was, "if target is null, skip down to NewPluginURLStream
() and use that to open the connection". I thought that if target is null, it
should make the target be "_self" and use nsIPluginInstanceOwner::GetURL().
Thus, strictly speaking, I didn't need to go through all the trouble I did for
36212. However, I'm glad I did, because it adds a feature to the case where a
plugin wants to Post data with a non-null target and add headers to the
outgoing request.
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
ok, a=waterson
Andrew Volkov wrote:
>
> I don't immediately see any problems. Looks good and seems to deal with the
> problem. r=av
FIX checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•