mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-11 13:10:32 +00:00
blaze822: compression fixes
This commit is contained in:
parent
d687378b62
commit
d0d371114c
@ -260,12 +260,13 @@ unfold_hdr(char *buf, char *end)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// compress fields by removing fws
|
||||||
for (s = buf; s < end; ) {
|
for (s = buf; s < end; ) {
|
||||||
char *t, *h;
|
char *t, *h;
|
||||||
size_t l = strlen(s) + 1;
|
size_t l = strlen(s) + 1;
|
||||||
|
|
||||||
if ((t = h = strchr(s, '\n'))) {
|
if ((t = h = strchr(s, '\n'))) {
|
||||||
while (*h) {
|
while (h < end && *h) {
|
||||||
if (*h == '\n') {
|
if (*h == '\n') {
|
||||||
*t++ = ' ';
|
*t++ = ' ';
|
||||||
while (*h && isfws(*h))
|
while (*h && isfws(*h))
|
||||||
@ -273,7 +274,8 @@ unfold_hdr(char *buf, char *end)
|
|||||||
}
|
}
|
||||||
*t++ = *h++;
|
*t++ = *h++;
|
||||||
}
|
}
|
||||||
*t = 0;
|
while (t < h)
|
||||||
|
*t++ = 0;
|
||||||
}
|
}
|
||||||
s += l;
|
s += l;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user