pike.git / lib / modules / SSL.pmod / https.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/https.pike:1:   #pike __REAL_VERSION__    - /* $Id: https.pike,v 1.12 2002/03/20 16:40:01 nilsson Exp $ + /* $Id: https.pike,v 1.13 2003/01/20 17:44:01 nilsson Exp $    *    * dummy https server    */      //! Dummy HTTPS server      #define PORT 25678      import Stdio;   
pike.git/lib/modules/SSL.pmod/https.pike:39:       object sslfile;       string message = "<html><head><title>SSL-3 server</title></head>\n"    "<body><h1>This is a minimal SSL-3 http server</h1>\n"    "<hr><it>/nisse</it></body></html>\n";    int index = 0;       void write_callback()    { -  if (index < strlen(message)) +  if (index < sizeof(message))    {    int written = sslfile->write(message[index..]);    if (written > 0)    index += written;    else    sslfile->close();    } -  if (index == strlen(message)) +  if (index == sizeof(message))    sslfile->close();    }       void read_callback(mixed id, string data)    {   #ifdef SSL3_DEBUG    werror("Received: '" + data + "'\n");   #endif    sslfile->set_write_callback(write_callback);    }