summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 11d89fe..4fd2a8b 100644
--- a/util.c
+++ b/util.c
@@ -44,7 +44,7 @@ int dial(char *host, char *port) {
int get(char *host, char *path, char *sendcookie, char *savecookie, char **buf) {
size_t l, res;
int fd, i, p;
- char h[HDRMAX] = "\0";
+ char h[HDRMAX] = "";
char c[COOKIEMAX] = "";
char t[BUFSIZ];
char *t2;
@@ -59,7 +59,7 @@ int get(char *host, char *path, char *sendcookie, char *savecookie, char **buf)
*buf = NULL;
l = 0;
- while((res = recv(fd, t, 1024, 0)) > 0) {
+ while((res = recv(fd, t, BUFSIZ, 0)) > 0) {
if(sscanf(t, "HTTP/%d.%d %d", &i, &i, &p) == 3 && p != 200)
return 0;
if(savecookie != NULL && sscanf(t, "Set-Cookie: %s;", c))