Hello,
I am quite new to the mozilla source code and my interest in this big piece
of software is the necko module. I was trying to understand the working of
the protocols.
Even i happen to read the document
"Writing a Mozilla Protocol Handler". But i was not able to get clearly how
the finger protocol source code works.
I mean to say i did not understand exactly when Onstartrequest and onstop
request is called and when the response data from the socket is recieved.
Also when i tried to go thru how an HTTP request will execute thru the
source code. I could not get when OnStartRequest is called.
I also refered the doc "Lifetime of a HTTP Request"
Please let me know the above. If u could point me out the source code where
in the call to OnStartRequestObject is called then i would be grateful.
PLease do this for the HTTP Request.
I have been able to trace the call up to OPen URI given below. In this
function it uses the documentopeninfo object as the Istreamlistener and has
OnStartRequest method defined for it.
But i cannot find where this method is getting ccalled. I think it should be
called somewhere when u write the request to the socket. I am not sure.
Also one more interesting thing is that when i trace the source code furthur
from this function i finallly reach a method called connect of class
nsHTTPChannel which furthur calls ResponseCompleted method of nsHTTPChannel.
In this method again , there is a call to OnStopRequest which boils down to
OnStopRequest mehod of nsDocumentopeninfo Object (same object which is
getting created in the following function shown).
BUt i had learnt that OnStopRequest method is called only after
OnStartRequest method. So in the source code there has to be a call to the
method
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OnStartRequest of nsDocumentopeninfo bbject.
NS_IMETHODIMP nsURILoader::OpenURIVia(nsIChannel *channel,
nsURILoadCommand aCommand,
const char * aWindowTarget,
nsISupports * aOriginalWindowContext,
PRUint32 aLocalIP)
{
// we need to create a DocumentOpenInfo object which will go ahead and
open the url
// and discover the content type....
nsresult rv = NS_OK;
nsDocumentOpenInfo* loader = nsnull;
if (!channel) return NS_ERROR_NULL_POINTER;
// Let the window context's uriListener know that the open is starting.
This
// gives that window a chance to abort the load process.
nsCOMPtr<nsIURIContentListener>
winContextListener(do_GetInterface(aOriginalWindowContext));
if(winContextListener)
{
// get channel from request
nsCOMPtr<nsIURI> uri;
channel->GetURI(getter_AddRefs(uri));
if(uri)
{
PRBool doAbort = PR_FALSE;
winContextListener->OnStartURIOpen(uri, aWindowTarget, &doAbort);
if(doAbort)
return NS_OK;
}
}
nsCAutoString windowTarget(aWindowTarget);
nsCOMPtr<nsISupports> retargetedWindowContext;
NS_ENSURE_SUCCESS(GetTarget(channel, windowTarget, aOriginalWindowContext,
getter_AddRefs(retargetedWindowContext)), NS_ERROR_FAILURE);
NS_NEWXPCOM(loader, nsDocumentOpenInfo);
if (!loader) return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(loader);
nsCOMPtr<nsIInterfaceRequestor> loadCookie;
SetupLoadCookie(retargetedWindowContext, getter_AddRefs(loadCookie));
loader->Init(retargetedWindowContext, aOriginalWindowContext); // Extra
Info
// now instruct the loader to go ahead and open the url
rv = loader->Open(channel, aCommand, windowTarget,
retargetedWindowContext);
NS_RELEASE(loader);
return rv;
}
Please let me now the above.
Also i think the finger protocols methods are not being called from anywhere
in the mozilla source code. If they are called please let me know from which
code. as i could not get that too.
Thanks in advance
Regards
Pras
"Bradley Baetz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 01 Mar 2001 10:48:45 -0800, rsnavale <[EMAIL PROTECTED]> wrote:
> >Bradley,
> >
> >May I know, when can we get the fix?
> >
> >Thanks,
> >Ram.
> >
> See bug 70404
>
> Bradley