neighbors_do_private_keys

From: Chengdu Huang <chuang@dont-contact.us>
Date: Mon, 28 Apr 2003 15:42:14 -0400 (EDT)

Hi,

I really can't figure out what this variable does from its name and I
noticed that it's set to 1 by default (in the release code). Below is
from httpProcessReplyHeader():

    if (neighbors_do_private_keys)
        httpMaybeRemovePublic(entry, reply->sline.status);

    switch (httpCachableReply(httpState)) {
    case 1:
        httpMakePublic(entry);
        break;
    case 0:
        httpMakePrivate(entry);
        break;
    case -1:
        httpCacheNegatively(entry);
        break;
    default:
        assert(0);
        break;
    }

httpMaybeRemovePublic() basically tries to find some public entry for
the url and method of current "entry". If such a public entry is
found, it will be storeRelease()ed. All these are perfectly
understandable.

But what about the rest of the code? The "entry" is found to be
cachable and therefore httpMakePublic() gets called which in turn
calls storeSetPublicKey(). storeSetPublicKey() does the same things as
httpMaybeRemovePublic(): finding out some public entry, trying to
storeRelease() it and set it to private key.

Why do we do the same thing twice?

Thanks.

--
Chengdu
Received on Mon Apr 28 2003 - 14:14:19 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:43 MST