Roxen.git / server / plugins / protocols / ftp.pike

version» Context lines:

Roxen.git/server/plugins/protocols/ftp.pike:1:   // This is a roxen protocol module.   // Copyright © 1997 - 2001, Roxen IS.      /*    * FTP protocol mk 2    * -  * $Id: ftp.pike,v 2.89 2004/04/04 14:24:52 mani Exp $ +  * $Id: ftp.pike,v 2.90 2004/05/17 13:15:07 mani Exp $    *    * Henrik Grubbström <grubba@roxen.com>    */      /*    * TODO:    *    * How much is supposed to be logged?    */   
Roxen.git/server/plugins/protocols/ftp.pike:175:   #else    DWRITE("REQUESTID: New request id.\n");   #endif       if (m_rid) {    this_program o = this;    foreach(indices(m_rid), string var) {    if (!(< "create", "connection", "configuration",    "__INIT", "clone_me", "end", "ready_to_receive",    "send", "scan_for_query", "send_result", "misc", -  "url_base", "set_response_header", +  "url_base", "set_response_header", "get_xml_data",    "add_response_header", "set_output_charset",    "adjust_for_config_path", "PrefLanguages", -  +  "charset_name", "charset_function", "join_charset", +  "output_encode",    "destroy", "_num", "__num">)[var]) {   #ifdef FTP2_DEBUG    if (catch {   #endif /* FTP2_DEBUG */    o[var] = m_rid[var];   #ifdef FTP2_DEBUG    }) {    report_error("FTP2: "    "Failed to copy variable %s (value:%O)\n",    var, m_rid[var]);
Roxen.git/server/plugins/protocols/ftp.pike:1159:    report_warning("FTP2: Write callback with nothing to send.\n");    }    } else {    report_error("FTP2: Write callback with no fd.\n");    destruct();    }    }       static private mapping(string:function) default_cb = ([    "BRK":lambda() { +  if(fd) { +  fd->close(); +  fd = 0; +  }    destruct();    throw(0);    },    "AYT":lambda() {    send("\377\361"); // NOP    },    "WILL":lambda(int code) {    send(sprintf("\377\376%c", code)); // DON'T xxx    },    "DO":lambda(int code) {
Roxen.git/server/plugins/protocols/ftp.pike:1867:    }       session->file = file;       if (!file || (file->error && (file->error >= 300))) {    DWRITE("FTP: open_file(\"%s\") failed: %O\n", fname, file);    send_error(cmd, fname, file, session);    return 0;    }    +  // If data is a wide string we flatten it according to the charset +  // preferences in the current ID object. +  if (file->data && String.width(file->data) > 8) +  file->data = session->output_encode(file->data, 0)[1]; +     file->full_path = fname;    file->request_start = time(1);       if (!file->len) {    if (file->data) {    file->len = sizeof(file->data);    }    if (objectp(file->file)) {    file->len += file->file->stat()[1];    }