pike.git / lib / modules / Web.pmod / Api.pmod / Api.pike

version» Context lines:

pike.git/lib/modules/Web.pmod/Api.pmod/Api.pike:270:    array(string) parts = make_multipart_message(params, data);    request_headers["content-type"] = parts[0];    data = parts[1];    params = 0;    }    }    else {    params = (mapping) p;    }    - #if constant (Protocols.HTTP.Promise) +     // If running in a handler thread (like in Roxen) we do an async call    // but wait for the request to finish before returning. In this way we    // can abort the request if it takes to long so that the handler thread    // can be released.    if (cb || !IS_BACKEND_THREAD()) {    Thread.Queue queue;    mixed retval;       Protocols.HTTP.Promise.Arguments args;    args = Protocols.HTTP.Promise.Arguments(([
pike.git/lib/modules/Web.pmod/Api.pmod/Api.pike:321: Inside #if constant (Protocols.HTTP.Promise)
      if (!cb) {    queue = Thread.Queue();    queue->read();    return retval;    }       return 0;    }    -  TRACE("Have promises but no async call or running on backend thread\n"); +  TRACE("Have no async call or running on backend thread\n");    - #endif /* Protocols.HTTP.Promise */ -  +     Protocols.HTTP.Query req = Protocols.HTTP.Query();       if (http_request_timeout) {    if (has_index(req, "maxtime")) {    req->maxtime = http_request_timeout;    }    else {    req->timeout = http_request_timeout;    }    }