pike.git / lib / modules / Tools.pmod / Standalone.pmod / httpserver.pike

version» Context lines:

pike.git/lib/modules/Tools.pmod/Standalone.pmod/httpserver.pike:19:   {    int my_port = 8080;    if(argc>1)    switch (argv[-1])    {    case "--version":    exit(0, version);    case "--help":    exit(0, doc);    default: +  string home = combine_path(getcwd(), argv[-1]); +  if( Stdio.is_dir(home) ) +  cd(home); +  else    my_port=(int)argv[-1];    }       Protocols.HTTP.Server.Port(handle_request, my_port, NetUtils.ANY);    write("%s is now accessible on port %d through http, "    "without password.\n", getcwd(), my_port);    return -1;   }      string dirlist( string dir )