Skip to content
Snippets Groups Projects
Commit f1ffc08a authored by Dmitry Simonenko's avatar Dmitry Simonenko
Browse files

client-admin-crlf-fix: fix client to support migration from \r\n to \n

parent 620371ac
No related branches found
No related tags found
No related merge requests found
......@@ -122,9 +122,9 @@ int tc_admin_reply(struct tc_admin *a, char **r, size_t *size)
memcpy(buf + off, rx, rxi);
off += rxi;
buf[off] = 0;
if (off >= 10) {
if (!memcmp(buf, "---\r\n", 5) &&
!memcmp(buf + off - 5, "...\r\n", 5)) {
if (off >= 8) {
if (!memcmp(buf, "---\n", 4) &&
!memcmp(buf + off - 4, "...\n", 4)) {
*r = buf;
*size = off;
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment