projects
/
project
/
uhttpd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ubus: add CORS header support
[project/uhttpd.git]
/
proc.c
diff --git
a/proc.c
b/proc.c
index
67356dd
..
9c4b685
100644
(file)
--- a/
proc.c
+++ b/
proc.c
@@
-224,6
+224,9
@@
static void proc_handle_header_end(struct relay *r)
ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur), blobmsg_data(cur));
ustream_printf(cl->us, "\r\n");
ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur), blobmsg_data(cur));
ustream_printf(cl->us, "\r\n");
+
+ if (cl->request.method == UH_HTTP_MSG_HEAD)
+ r->skip_data = true;
}
static void proc_write_close(struct client *cl)
}
static void proc_write_close(struct client *cl)
@@
-282,9
+285,8
@@
static int proc_data_send(struct client *cl, const char *data, int len)
if (errno == EAGAIN || errno == EWOULDBLOCK)
break;
if (errno == EAGAIN || errno == EWOULDBLOCK)
break;
- /* error, no retry */
- len = 0;
- break;
+ /* consume all data */
+ ret = len;
}
if (!ret)
}
if (!ret)