Closed
Bug 123974
Opened 23 years ago
Closed 23 years ago
[viewpoint] 404 file not found errors are passed back to the plugin incorrectly
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: aberger, Assigned: srgchrpv)
References
()
Details
Attachments
(1 file, 2 obsolete files)
|
6.62 KB,
patch
|
beard
:
review+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
BuildID: 0.9.4 branch
Our plugin calls NPN_GetURLNotify for a file that does not exist. In this case:
instance: our plugin instance
url: http://cole.viewpoint.com/~aberger/standard_primitives/cone.html
target: NULL
notifyData: some pointer (not NULL)
We expect to get back an error in UrlNotify. Instead, we get no error. We get
a new stream, the contents of which is the 404 error that the browser would
give you if you type the URL in the address bar- something like, "404 error the
document could not be found..."
We do see that the MIME type is text/html instead of the expected
application/metastream. But overall, that is a bad way to test for failure-
the networking layer has no idea what MIME type to expect.
Reproducible: Always
Steps to Reproduce:
1.Install viewpoint plugin.
2.View above URL
3.Notice the parse error- we try to parse the 404 error as an XML file.
4. Look to see what Mozilla passes us- we get a NewStream instead of a Notify.
| Reporter | ||
Updated•23 years ago
|
Summary: 404 file not found errors are passed back to the plugin incorrectly → [viewpoint] 404 file not found errors are passed back to the plugin incorrectly
| Assignee | ||
Comment 1•23 years ago
|
||
Andrei, if you don't mind I can take care of this,
I've ran into similar problem with some plugger's bugs on linux.
Comment 2•23 years ago
|
||
-->over to Serge
Could we just check the HTTP status on the stream before giving it to the plugin
and call notify accordingly?
Assignee: av → serge
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
Hardware: PC → All
| Assignee | ||
Comment 3•23 years ago
|
||
it checks http response header for > 206 at the beginning of
nsPluginStreamListenerPeer::OnStartReques() method
Comment on attachment 69406 [details] [diff] [review]
patch v1.
r=av. (Do you really want your name in comments?)
Attachment #69406 -
Flags: review+
| Assignee | ||
Updated•23 years ago
|
Attachment #69406 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•23 years ago
|
||
no name in comment
Comment on attachment 69514 [details] [diff] [review]
patch v1.1
r=av
Attachment #69514 -
Flags: review+
Comment 7•23 years ago
|
||
Comment on attachment 69514 [details] [diff] [review]
patch v1.1
In |nsPluginStreamInfo::GetLocalCachedFile()|, if mFilePath is nsnull,
then the value returned in *path should also be nsnull, so in that case
you should assigning nsnull to *path.
Attachment #69514 -
Flags: needs-work+
| Assignee | ||
Comment 8•23 years ago
|
||
changes in
nsPluginStreamInfo::GetLocalCachedFile(char** path)
{
if (mFilePath)
*path = PL_strdup(mFilePath);
else
*path = nsnull;
}
Attachment #69514 -
Attachment is obsolete: true
Comment 9•23 years ago
|
||
FWIW: prefer strdup to PL_strdup whereever possible since it might be much
better optimized on some systems.
Comment 10•23 years ago
|
||
Comment on attachment 69692 [details] [diff] [review]
v1.2
sr=beard
Attachment #69692 -
Flags: review+
| Assignee | ||
Comment 11•23 years ago
|
||
>prefer strdup to PL_strdup ...
Darin, you are right if we do check for null pointer
there is no risk to use strdup after that.
| Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.9
| Assignee | ||
Comment 12•23 years ago
|
||
Checking in nsPluginHostImpl.cpp;
new revision: 1.359; previous revision: 1.358
Checking in ns4xPluginInstance.cpp;
new revision: 1.82; previous revision: 1.81
Status: NEW → RESOLVED
Closed: 23 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
•