static char *
ngx_http_fastcgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
    ngx_http_fastcgi_loc_conf_t *flcf = conf;
    ngx_url_t                   u;
    ngx_str_t                  *value, *url;
    ngx_uint_t                  n;
    ngx_http_core_loc_conf_t   *clcf;
    ngx_http_script_compile_t   sc;
    if (flcf->upstream.upstream || flcf->fastcgi_lengths) {
        return "is duplicate";
    }
    clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
    clcf->handler = ngx_http_fastcgi_handler;
    value = cf->args->elts;
    url = &value[1];
    n = ngx_http_script_variables_count(url);
    if (n) {
        ngx_memzero(&sc, sizeof(ngx_http_script_compile_t));
        sc.cf = cf;
        sc.source = url;
        sc.lengths = &flcf->fastcgi_lengths;
        sc.values = &flcf->fastcgi_values;
        sc.variables = n;
        sc.complete_lengths = 1;
        sc.complete_values = 1;
        if (ngx_http_script_compile(&sc) != NGX_OK) {
            return NGX_CONF_ERROR;
        }
        return NGX_CONF_OK;
    }
    ngx_memzero(&u, sizeof(ngx_url_t));
    u.url = value[1];
    u.no_resolve = 1;
    flcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0);
    if (flcf->upstream.upstream == NULL) {
        return NGX_CONF_ERROR;
    }
    if (clcf->name.data[clcf->name.len - 1] == '/') {
        clcf->auto_redirect = 1;
    }
    return NGX_CONF_OK;
}
['static char *\nngx_http_fastcgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)\n{\n    ngx_http_fastcgi_loc_conf_t *flcf = conf;\n    ngx_url_t                   u;\n    ngx_str_t                  *value, *url;\n    ngx_uint_t                  n;\n    ngx_http_core_loc_conf_t   *clcf;\n    ngx_http_script_compile_t   sc;\n    if (flcf->upstream.upstream || flcf->fastcgi_lengths) {\n        return "is duplicate";\n    }\n    clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);\n    clcf->handler = ngx_http_fastcgi_handler;\n    value = cf->args->elts;\n    url = &value[1];\n    n = ngx_http_script_variables_count(url);\n    if (n) {\n        ngx_memzero(&sc, sizeof(ngx_http_script_compile_t));\n        sc.cf = cf;\n        sc.source = url;\n        sc.lengths = &flcf->fastcgi_lengths;\n        sc.values = &flcf->fastcgi_values;\n        sc.variables = n;\n        sc.complete_lengths = 1;\n        sc.complete_values = 1;\n        if (ngx_http_script_compile(&sc) != NGX_OK) {\n            return NGX_CONF_ERROR;\n        }\n        return NGX_CONF_OK;\n    }\n    ngx_memzero(&u, sizeof(ngx_url_t));\n    u.url = value[1];\n    u.no_resolve = 1;\n    flcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0);\n    if (flcf->upstream.upstream == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    if (clcf->name.data[clcf->name.len - 1] == \'/\') {\n        clcf->auto_redirect = 1;\n    }\n    return NGX_CONF_OK;\n}', 'ngx_http_upstream_srv_conf_t *\nngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)\n{\n    ngx_uint_t                      i;\n    ngx_http_upstream_server_t     *us;\n    ngx_http_upstream_srv_conf_t   *uscf, **uscfp;\n    ngx_http_upstream_main_conf_t  *umcf;\n    if (!(flags & NGX_HTTP_UPSTREAM_CREATE)) {\n        if (ngx_parse_url(cf->pool, u) != NGX_OK) {\n            if (u->err) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "%s in upstream \\"%V\\"", u->err, &u->url);\n            }\n            return NULL;\n        }\n    }\n    umcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_upstream_module);\n    uscfp = umcf->upstreams.elts;\n    for (i = 0; i < umcf->upstreams.nelts; i++) {\n        if (uscfp[i]->host.len != u->host.len\n            || ngx_strncasecmp(uscfp[i]->host.data, u->host.data, u->host.len)\n               != 0)\n        {\n            continue;\n        }\n        if ((flags & NGX_HTTP_UPSTREAM_CREATE)\n             && (uscfp[i]->flags & NGX_HTTP_UPSTREAM_CREATE))\n        {\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "duplicate upstream \\"%V\\"", &u->host);\n            return NULL;\n        }\n        if ((uscfp[i]->flags & NGX_HTTP_UPSTREAM_CREATE) && u->port) {\n            ngx_conf_log_error(NGX_LOG_WARN, cf, 0,\n                               "upstream \\"%V\\" may not have port %d",\n                               &u->host, u->port);\n            return NULL;\n        }\n        if ((flags & NGX_HTTP_UPSTREAM_CREATE) && uscfp[i]->port) {\n            ngx_log_error(NGX_LOG_WARN, cf->log, 0,\n                          "upstream \\"%V\\" may not have port %d in %s:%ui",\n                          &u->host, uscfp[i]->port,\n                          uscfp[i]->file_name, uscfp[i]->line);\n            return NULL;\n        }\n        if (uscfp[i]->port != u->port) {\n            continue;\n        }\n        if (uscfp[i]->default_port && u->default_port\n            && uscfp[i]->default_port != u->default_port)\n        {\n            continue;\n        }\n        return uscfp[i];\n    }\n    uscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_upstream_srv_conf_t));\n    if (uscf == NULL) {\n        return NULL;\n    }\n    uscf->flags = flags;\n    uscf->host = u->host;\n    uscf->file_name = cf->conf_file->file.name.data;\n    uscf->line = cf->conf_file->line;\n    uscf->port = u->port;\n    uscf->default_port = u->default_port;\n    if (u->naddrs == 1) {\n        uscf->servers = ngx_array_create(cf->pool, 1,\n                                         sizeof(ngx_http_upstream_server_t));\n        if (uscf->servers == NULL) {\n            return NGX_CONF_ERROR;\n        }\n        us = ngx_array_push(uscf->servers);\n        if (us == NULL) {\n            return NGX_CONF_ERROR;\n        }\n        ngx_memzero(us, sizeof(ngx_http_upstream_server_t));\n        us->addrs = u->addrs;\n        us->naddrs = u->naddrs;\n    }\n    uscfp = ngx_array_push(&umcf->upstreams);\n    if (uscfp == NULL) {\n        return NULL;\n    }\n    *uscfp = uscf;\n    return uscf;\n}']