Closed
Bug 50811
Opened 24 years ago
Closed 24 years ago
Plugins need way to access HTTP response headers on GET/POST
Categories
(Core Graveyard :: Plug-ins, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: edburns, Assigned: edburns)
References
Details
Attachments
(3 files)
3.53 KB,
patch
|
Details | Diff | Splinter Review | |
2.77 KB,
patch
|
Details | Diff | Splinter Review | |
21.94 KB,
application/octet-stream
|
Details |
Currently there is no way for plugins to access the response headers for HTTP GET or POST requests.
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, nsIPluginHTTPHeaderListener.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, nsIPluginHTTPHeaderListener *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/nsIPluginHTTPHeaderListener.idl M modules/plugin/nglsrc/nsPluginHostImpl.cpp Attachments to follow.
Keywords: nsbeta3
Comment 6•24 years ago
|
||
Increasing priority to P2 as this is high profile functionality (functional completeness and usability of plug-in API for plug-in partners) and high profile backward compatibility (determines whether plug-in vendors will be able to upgrade their plug-ins to provide equivalent functionality on N6 as they did on N4). Ed, want to accept this as [nsbeta3+]? Mark it as so if you think you can fix this in time. P2s can be checked in with mozilla reviewer approval through 9/21.
Keywords: correctness
Priority: P3 → P2
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 52973 has been marked as a duplicate of this bug. ***
Please see bug 52963.
Assignee | ||
Comment 10•24 years ago
|
||
Fix checked in.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•