printf("starting\n");
nsresult rv; char* contentType; rv = channel->GetContentType(&contentType); if (NS_FAILED(rv)) return rv; PRInt32 length; rv = channel->GetContentLength(&length); if (NS_FAILED(rv)) return rv; printf("stream opened: content type = %s, length = %d\n", contentType, length); nsCRT::free(contentType);
    NS_IMETHOD OnStartRequest(nsIChannel *channel, nsISupports *ctxt) {        printf("starting\n");        return NS_OK;    }