Here is how we handle a recursive resolution so that:

1. We can handle case-insensitive queries

2. We can preserve case for case sensitive queries

It goes like this:

1. We process the query, exactly as the user typed it in.

2. We see if the query the user typed in is in the cache.  If so, and if
   not expired (yadda yadda yadda), give them the answer, and stop

3. We see if the lower-case version of the query they typed in is in the
   cache.  If so, check expire, give them the answer, and stop

4. Change query type to "name server entry in cache"

copy query to $query

Do:

a. See if $query is in the cache.  If so, check expire and query
   nameserver (see below)

b. See if lower-case version of $query is in the cache.  If so, check
   expire and query nameserver (see below)

c. If query is a zero-length query (the root server), we have an error.
   Stop on fatal error.

c. lop off the leading domain label in $query with the bobbit function

Go back to step a.

Assuming that we ask the nameserver for a query, do the following:

1. Ask the nameserver if they have any knowledge of the host we are
   originally queried.

2. Look at the domain label they send us as a reply

3. Chop off labels of the original query until it is the same length as
   the reply they sent us.  If this is not possible, we have an error
   condition

4. Compare the bobbited original query with the server reply.  If they
   are identical, the query is not case-sensitive.  If they are not
   identical, fold the case of the reply before placing it in the cache
   (all-lower-case replies are case insensitive)

5. Place reply in the cache.  I have already written the code to do this.


