    if ((stbuf.st_mode & S_IFMT) == S_IFDIR) {
      if (cn->filereq[strlen(cn->filereq)-1] != '/') {
        send301(cn);
-@@ -256,16 +344,24 @@
+@@ -256,16 +352,24 @@
  
      // Check to see if this dir has an index file
      if (procindex(cn, &stbuf) == 0) {

     return;
   }
 
@@ -328,13 +468,13 @@
 
 void procreadfile(struct connstruct *cn) {
 

 
   cn->state = STATE_DOING_DIR;
 
@@ -134,36 +153,48 @@
 
 void procdodir(struct connstruct *cn) {
 
