* conf->body_set_len = NULL;
* conf->body_set = NULL;
* conf->body_source = { 0, NULL };
- * conf->rewrite_locations = NULL;
+ * conf->redirects = NULL;
*/
conf->upstream.store = NGX_CONF_UNSET;
}
if (ngx_strcmp(value[1].data, "default") == 0) {
+ if (plcf->proxy_lengths) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "\"proxy_redirect default\" may not be used "
+ "with \"proxy_pass\" directive with variables");
+ return NGX_CONF_ERROR;
+ }
+
if (plcf->url.data == NULL) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "\"proxy_rewrite_location default\" must go "
+ "\"proxy_redirect default\" must go "
"after the \"proxy_pass\" directive");
return NGX_CONF_ERROR;
}
r->headers_out.location->value.len = b->last - p;
r->headers_out.location->value.data = p;
- r->headers_out.location->key.len = sizeof("Location: ") - 1;
- r->headers_out.location->key.data = (u_char *) "Location: ";
+ r->headers_out.location->key.len = sizeof("Location") - 1;
+ r->headers_out.location->key.data = (u_char *) "Location";
*b->last++ = CR; *b->last++ = LF;
}
return NULL;
}
- if (ngx_strncmp(name->data, "upstream_http_", 10) == 0) {
+ if (ngx_strncmp(name->data, "upstream_http_", 14) == 0) {
if (ngx_http_upstream_header_variable(r, vv, (uintptr_t) name)
== NGX_OK)