Update rev proxy error document handling
This commit is contained in:
@ -561,13 +561,16 @@ int client_request_handler(sock *client, unsigned long client_num, unsigned int
|
||||
const http_doc_info *info = http_get_status_info(res.status);
|
||||
const http_status_msg *http_msg = http_get_error_msg(res.status);
|
||||
|
||||
if (res.status->code >= 300 && res.status->code < 400 && msg_content[0] == 0) {
|
||||
if (msg_content[0] == 0) {
|
||||
if (res.status->code >= 300 && res.status->code < 400) {
|
||||
const char *location = http_get_header_field(&res.hdr, "Location");
|
||||
if (location != NULL) {
|
||||
snprintf(msg_content, sizeof(msg_content),
|
||||
"<ul>\n\t<li><a href=\"%1$s\">%1$s</a></li>\n</ul>\n", location);
|
||||
snprintf(msg_content, sizeof(msg_content), "<ul>\n\t<li><a href=\"%1$s\">%1$s</a></li>\n</ul>\n", location);
|
||||
}
|
||||
}
|
||||
} else if (strncmp(msg_content, "<!DOCTYPE html>", 15) == 0 || strncmp(msg_content, "<html", 5) == 0) {
|
||||
msg_content[0] = 0;
|
||||
}
|
||||
|
||||
char *rev_proxy_doc = "";
|
||||
if (conf != NULL && conf->type == CONFIG_TYPE_REVERSE_PROXY) {
|
||||
|
Reference in New Issue
Block a user