pluginhostctrl.dll NPN_PostURL implementation fails to POST data

RESOLVED INCOMPLETE

Status

()

Core
Plug-ins
--
major
RESOLVED INCOMPLETE
13 years ago
5 years ago

People

(Reporter: Joel Dice, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040809 Firefox/0.9.3
Build Identifier: MSIE 6.0.2800.1106

When using pluginhostctrl.dll with a plugin that calls NPN_PostURL or
NPN_PostURLNotify, the request sent to the server is empty (Content-Length: 0
and no body).  I've seen this happen under Windows 2000 and MSIE 6.0.2800.1106,
but I doubt it is OS or browser-specific.  I have a patch to fix the problem
along with a few other build and runtime bugs which I will attach to this bug.

Reproducible: Always
Steps to Reproduce:
1. Write a plugin which uses NPN_PostURL or NPN_PostURLNotify to one or more
bytes of data, along with a test page which uses the plugin via the
pluginhostctrl.dll ActiveX binding.
2. Install the plugin and visit the test page in MSIE.
3. Watch the POST fail (use a network traffic recorder like ethereal to see that
the POST is always empty).

Actual Results:  
The control sent an empty POST to the server.

Expected Results:  
It should have sent the non-empty POST specified by the plugin.
(Reporter)

Comment 1

13 years ago
Created attachment 156596 [details] [diff] [review]
proposed patch to fix the bug, along with a few other minor bugs

I've been using this patch myself and it's worked well.  Please let me know if
it needs refining.

By the way, in order to make the code build without using Visual Studio (which
I don't currently know how to use), I translated part of pluginhostctrl.dsp
into a GNU-compatible makefile.  I'd like to share this with others, but I
don't know what the appopriate venue is to do so.  Please let me know if you
have any suggestions.  Thanks.

Comment 2

13 years ago
Comment on attachment 156596 [details] [diff] [review]
proposed patch to fix the bug, along with a few other minor bugs

>Index: npn.cpp
>- * ***** END LICENSE BLOCK ***** */
>+ * ***** END LICENSE BLOCK *****
>  */
remove the other */

>Index: nsURLDataCallback.cpp
>@@ -85,23 +86,26 @@ void nsURLDataCallback::SetPostData(cons
>-            void *pPostData = GlobalLock(m_hPostData);
>+	    void *pPostData = (void*) m_hPostData;
don't use tabs.
(Reporter)

Comment 3

13 years ago
Created attachment 156610 [details] [diff] [review]
proposed patch to fix the bug, along with a few other minor bugs (second try)

(In reply to comment #2)
> (From update of attachment 156596 [details] [diff] [review])
> >Index: npn.cpp
> >- * ***** END LICENSE BLOCK ***** */
> >+ * ***** END LICENSE BLOCK *****
> >  */
> remove the other */
> 
> >Index: nsURLDataCallback.cpp
> >@@ -85,23 +86,26 @@ void nsURLDataCallback::SetPostData(cons
> >-		void *pPostData = GlobalLock(m_hPostData);
> >+	    void *pPostData = (void*) m_hPostData;
> don't use tabs.

Done.  Thanks for the feedback.
Attachment #156596 - Attachment is obsolete: true
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
(Reporter)

Comment 5

12 years ago
This bug remains present in the latest seamonkey CVS, with no sign that the
patch has been applied.
confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 7

5 years ago
The patch here is to code which doesn't exist, and AFAIK we support post bodies. Please refile this bug with better examples if it is still valid.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.