Add sock_send_x and remove fastcgi compression

This commit is contained in:
2023-01-12 19:50:35 +01:00
parent 5138dafb8e
commit f96dc46ea7
10 changed files with 55 additions and 135 deletions

@ -106,6 +106,16 @@ long sock_send(sock *s, void *buf, unsigned long len, int flags) {
}
}
long sock_send_x(sock *s, void *buf, unsigned long len, int flags) {
long sent = 0;
for (long ret; sent < len; sent += ret) {
ret = sock_send(s, buf + sent, len - sent, flags);
if (ret <= 0)
return ret;
}
return sent;
}
long sock_recv(sock *s, void *buf, unsigned long len, int flags) {
long ret;
if (s->enc) {