Darin Fisher wrote:

> Judson Valeski wrote:
> > There are stream listener type consumers (the one's getting the data), and there
> > are channel consumers (folks who just hold ref to a channel). The latter has no
> > concept of whether or not a request/stream/channel has been "opened."
>
> These folks are mis-using nsIChannel.  See below.

:-). You're like a re-incarnation of me. I believe if you dig deep enough, you'll find
that exact quote from me a year ago. Making them use it properly was enough for us to
back off.

> >>  If the consumer does not have an open
> >> request/stream, then the best they can do is talk to the MIME service.
> >
> >
> > how do they know if it's "open" or not?
>
> If they have a nsIRequest, and OnStartRequest has fired, then they know
> they can query the content-type, etc.

You're talking about stream listener consumers. Sure, those semantics will hold up
there. But what about channel consumers who count on content type info?

> Otherwise, they must use the MIME service.  It is wrong to create channels just for
> the purpose of MIME
> type resolution.

Agreed. The don't create them for that purpose, they just acquire a ref to one at some
point in the chain.

> Then it is clear.  Consumers must talk to the MIME service if they do
> not have an "open/completed" request to query.

:-), works for me. I'll be curious if we hit the same roadblocks we hit before.
Hopefully the uriloader is more flexible regarding this issue now.

Jud

Reply via email to