CLEANUP: http-htx: Remove unused storage of error messages in buffers
Now, error messages are all stored in http replies. So the storage as a buffer
can safely be removed.
diff --git a/src/http_ana.c b/src/http_ana.c
index 35ea8e9..138c029 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -5188,7 +5188,6 @@
? (TX_NOT_FIRST|TX_WAIT_NEXT_RQ)
: 0);
txn->status = -1;
- txn->errmsg = NULL;
txn->http_reply = NULL;
write_u32(txn->cache_hash, 0);
diff --git a/src/http_htx.c b/src/http_htx.c
index cefd8f6..78a5553 100644
--- a/src/http_htx.c
+++ b/src/http_htx.c
@@ -42,7 +42,6 @@
union {
struct {
int status; /* the status code associated to this error */
- struct buffer *msg; /* the HTX error message */
struct http_reply *reply; /* the http reply for the errorfile */
} errorfile; /* describe an "errorfile" directive */
struct {
@@ -1702,7 +1701,6 @@
}
conf_err->type = 1;
conf_err->info.errorfile.status = status;
- conf_err->info.errorfile.msg = msg;
conf_err->info.errorfile.reply = reply;
conf_err->file = strdup(file);
@@ -1766,7 +1764,6 @@
}
conf_err->type = 1;
conf_err->info.errorfile.status = status;
- conf_err->info.errorfile.msg = msg;
conf_err->info.errorfile.reply = reply;
conf_err->file = strdup(file);
conf_err->line = line;
@@ -1851,7 +1848,6 @@
if (conf_err->type == 1) {
/* errorfile */
rc = http_get_status_idx(conf_err->info.errorfile.status);
- px->errmsg[rc] = conf_err->info.errorfile.msg;
px->replies[rc] = conf_err->info.errorfile.reply;
}
else {
@@ -1873,10 +1869,8 @@
free(conf_err->info.errorfiles.name);
for (rc = 0; rc < HTTP_ERR_SIZE; rc++) {
if (conf_err->info.errorfiles.status[rc] > 0) {
- if (http_errs->errmsg[rc]) {
- px->errmsg[rc] = http_errs->errmsg[rc];
+ if (http_errs->replies[rc])
px->replies[rc] = http_errs->replies[rc];
- }
else if (conf_err->info.errorfiles.status[rc] == 2)
ha_warning("config: proxy '%s' : status '%d' not declared in"
" http-errors section '%s' (at %s:%d).\n",
@@ -1936,7 +1930,6 @@
new_conf_err->type = conf_err->type;
if (conf_err->type == 1) {
new_conf_err->info.errorfile.status = conf_err->info.errorfile.status;
- new_conf_err->info.errorfile.msg = conf_err->info.errorfile.msg;
new_conf_err->info.errorfile.reply = conf_err->info.errorfile.reply;
}
else {
@@ -2057,7 +2050,6 @@
reply->body.errmsg = msg;
rc = http_get_status_idx(status);
- curr_errs->errmsg[rc] = msg;
curr_errs->replies[rc] = reply;
}
else if (*args[0] != 0) {