Re: No NPP_Stream callback

Martin Husemann <[email protected]>
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
I wrote:
> Ok, I will try it another time (some folks may remember me barking up
> the wrong tree with similar issues already twice):
>
> On Windows, with Firefox 10.0.2 I have a plugin that does:
>
> (1) -> NPN_GetURLNotify(m_inst, url, NULL, (void*)token)
>
> and usually Firefox responds with:

I forgot to mention the

   NPP_NewStream()

I get here, where I set *stype to NP_ASFILEONLY and return
NPERR_NO_ERROR. This happens in the failure case as well, but neither
NPP_WriteReady()/NPP_Write() nor NPP_StreamAsFile() are called.

> (2) <- NPP_StreamAsFile()
> (3) <- NPP_DestroyStream()
>
> Now sometimes I don't get the NPP_StreamAsFile() callback, but straight
> away a NPP_DestroyStream() - with reason == NPRES_DONE.
>
> However, since I did not receive any data in between my plugin is a bit
> confused. I am realy sure the notifyData passed to NPN_GetURLNotify() is
> != NULL. And sometimes it actually works, but I have no clue yet, when
> and why.
>
> Any hints?


If I do not request streaming to file (i.e. set *stype = NP_NORMAL in
NPP_NewStream()) everything works as expected. The URL in question is a
JPEG file with proper "image/jpeg" mime type.

Should I file a bug report?

Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.