We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
we need to save the server addr somewhere else, just like below
static ngx_int_t ngx_http_upstream_get_jdomain_peer(ngx_peer_connection_t *pc, void *data) { ngx_http_upstream_jdomain_peer_data_t *jp = data; ngx_http_request_t *r; ngx_http_upstream_t *u; ngx_int_t rc;
ngx_str_t *addr; u_char *p; size_t len; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0, "get jdomain peer"); rc = jp->original_get_peer(pc, jp->data); if (rc != NGX_OK) { return rc; } r = jp->request; u = r->upstream; len = pc->name->len; p = ngx_pnalloc(r->pool, len); if (p == NULL) { return NGX_ERROR; } ngx_memcpy(p, pc->name->data, len); addr = ngx_palloc(r->pool, sizeof(ngx_str_t)); if (addr == NULL) { return NGX_ERROR; } addr->data = p; addr->len = len; pc->name = addr; return NGX_OK;
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
we need to save the server addr somewhere else, just like below
static ngx_int_t
ngx_http_upstream_get_jdomain_peer(ngx_peer_connection_t *pc,
void *data)
{
ngx_http_upstream_jdomain_peer_data_t *jp = data;
ngx_http_request_t *r;
ngx_http_upstream_t *u;
ngx_int_t rc;
}
The text was updated successfully, but these errors were encountered: