- // When out of process, we run natively and directly process the message.
- return processMessage(request.getApplication(), request, request);
+ // When out of process, we run natively and directly process the message, except that we
+ // have to indirect the request anyway in order to override the client address. This is
+ // the simplest way to get a delegated HTTPRequest object, and since this code path is
+ // not really one we expect to use, it's good enough.
+ vector<string> headers(1, "User-Agent");
+ headers.push_back("Accept");
+ headers.push_back("Accept-Language");
+ headers.push_back("Cookie");
+ DDF in = wrap(request, &headers);
+ DDFJanitor jin(in);
+ scoped_ptr<HTTPRequest> fakedreq(getRequest(in));
+ return processMessage(request.getApplication(), *fakedreq, request, in);