nsresult rv; nsIURL* url = nsnull;
nsresult rv = NS_OK; nsINetService *inet = nsnull;
nsresult nsDocumentBindInfo::Bind(const nsString& aURLSpec,                                   nsIPostData* aPostData,                                  nsIStreamListener* aListener){    nsresult rv;    nsIURL* url = nsnull;    /* If this nsDocumentBindInfo was created with a container pointer.     * extract the nsISupports iface from it and create the url with      * the nsISupports pointer so the backend can have access to the front     * end nsIContentViewerContainer for refreshing urls.     */    rv = m_DocLoader->CreateURL(&url, nsnull, aURLSpec, m_Container);    if (NS_FAILED(rv)) {      return rv;    }    /* Store any POST data into the URL */    if (nsnull != aPostData) {        static NS_DEFINE_IID(kPostToServerIID, NS_IPOSTTOSERVER_IID);        nsIPostToServer* pts;        rv = url->QueryInterface(kPostToServerIID, (void **)&pts);        if (NS_OK == rv) {            const char* data = aPostData->GetData();            if (aPostData->IsFile()) {                pts->SendDataFromFile(data);            }            else {                pts->SendData(data, aPostData->GetDataLength());            }        }    }    rv = Bind(url, aListener);    NS_RELEASE(url);    return rv;}