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)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: aberger, Assigned: srgchrpv)

References

()

Details

Attachments

(1 file, 2 obsolete files)

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.
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
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.
-->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
Attached patch patch v1. (obsolete) — Splinter Review
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+
Attachment #69406 - Attachment is obsolete: true
Attached patch patch v1.1 (obsolete) — Splinter Review
no name in comment
Comment on attachment 69514 [details] [diff] [review] patch v1.1 r=av
Attachment #69514 - Flags: review+
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+
Attached patch v1.2Splinter Review
changes in nsPluginStreamInfo::GetLocalCachedFile(char** path) { if (mFilePath) *path = PL_strdup(mFilePath); else *path = nsnull; }
Attachment #69514 - Attachment is obsolete: true
FWIW: prefer strdup to PL_strdup whereever possible since it might be much better optimized on some systems.
Comment on attachment 69692 [details] [diff] [review] v1.2 sr=beard
Attachment #69692 - Flags: review+
>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.
Target Milestone: --- → mozilla0.9.9
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
'url not found' error.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: