Changeset 7389

Show
Ignore:
Timestamp:
02/20/07 19:54:46 (23 months ago)
Author:
BradNeuberg
Message:

Getting hooks into Polipo's web server to expose our API -- we display hello world in HTML at this point

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/dot/proxy/local.c

    r7359 r7389  
    192192                     "</body></html>\n"); 
    193193        object->length = object->size; 
     194#ifndef NO_OFFLINE_SUPPORT 
     195    } else if(matchUrl("/polipo/offline", object)) { 
     196            fprintf(stderr, "/polipo/offline was called!"); 
     197            fflush(stderr); 
     198            objectPrintf(object, 0, 
     199                                        "<!DOCTYPE HTML PUBLIC " 
     200                     "\"-//W3C//DTD HTML 4.01 Transitional//EN\" " 
     201                     "\"http://www.w3.org/TR/html4/loose.dtd\">\n" 
     202                     "<html><head>\n" 
     203                     "<title>Hello World</title>\n" 
     204                     "</head><body>\n" 
     205                     "<h1>Hello from the Polipo world!!!!! This is exciting!</h1>\n"); 
     206        object->length = object->size; 
     207#endif 
    194208    } else if(matchUrl("/polipo/status", object)) { 
    195209        objectPrintf(object, 0,