Small usability nits

This commit is contained in:
cpq committed 2023-01-27 09:36:16 +00:00
1 parent e635d5f748
commit 84893ec582
5 files changed
+11 -11

No files matched your search

+3 -3
View File
@@ -325,10 +325,10 @@ void mg_http_reply(struct mg_connection *c, int code, const char *headers,
mg_vxprintf(mg_pfn_iobuf, &c->send, fmt, &ap);
va_end(ap);
if (c->send.len > 15) {
mg_snprintf((char *) &c->send.buf[len - 14], 11, "%010lu",
(unsigned long) (c->send.len - len));
size_t n = mg_snprintf((char *) &c->send.buf[len - 14], 11, "%-10lu",
(unsigned long) (c->send.len - len));
c->send.buf[len - 14 + n] = ' '; // Change ending 0 to space
c->is_resp = 0;
c->send.buf[len - 4] = '\r'; // Change ending 0 to space
}
c->is_resp = 0;
}