Roxen.git / server / modules / filesystems / filesystem.pike

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1:   // This is a roxen module. Copyright © 1996 - 1998, Idonex AB.      // This is a virtual "file-system".   // It will be located somewhere in the name-space of the server.   // Also inherited by some of the other filesystems.      inherit "module";   inherit "roxenlib";   inherit "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.50 1999/04/21 15:42:54 grubba Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.51 1999/04/21 16:48:05 grubba Exp $";   constant thread_safe=1;         #include <module.h>   #include <roxen.h>   #include <stat.h>      #if DEBUG_LEVEL > 20   # ifndef FILESYSTEM_DEBUG   # define FILESYSTEM_DEBUG
Roxen.git/server/modules/filesystems/filesystem.pike:234:   }         mapping putting = ([]);      void done_with_put( array(object) id )   {   // perror("Done with put.\n");    id[0]->close();    id[1]->set_blocking(); -  if (putting[id[1]]) { +  if (putting[id[1]] && (putting[id[1]] != 0x7fffffff)) {    // Truncated!    id[1]->write("400 Bad Request - Expected more data.\r\n"    "Content-Length: 0\r\n\r\n");    } else {    id[1]->write("HTTP/1.0 200 Transfer Complete.\r\n"    "Content-Length: 0\r\n\r\n");    }    id[1]->close();    m_delete(putting, id[1]);    destruct(id[0]);
Roxen.git/server/modules/filesystems/filesystem.pike:266:    // Out of disk!    id[0]->close();    id[1]->set_blocking();    id[1]->write("HTTP/1.0 413 Disk full.\r\n"    "Content-Length: 0\r\n\r\n");    id[1]->close();    m_delete(putting, id[1]);    destruct(id[0]);    destruct(id[1]);    } else { +  if (putting[id[1]] != 0x7fffffff) {    putting[id[1]] -= bytes; -  +  }    if(putting[id[1]] <= 0) {    putting[id[1]] = 0; // Paranoia    done_with_put( id );    }    }   }      int _file_size(string X,object id)   {    array fs;