summaryrefslogtreecommitdiff
path: root/src/user/app/httpd/httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/app/httpd/httpd.c')
-rw-r--r--src/user/app/httpd/httpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/user/app/httpd/httpd.c b/src/user/app/httpd/httpd.c
index 9141a39..2ffc2ba 100644
--- a/src/user/app/httpd/httpd.c
+++ b/src/user/app/httpd/httpd.c
@@ -21,7 +21,7 @@ static void handle(FILE *c) {
char *end = strchr(path, ' ');
if (end) *end = '\0';
- handle_t h = _syscall_open(path, strlen(path), OPEN_RO);
+ handle_t h = _syscall_open(path, strlen(path), OPEN_READ);
if (h < 0) {
fprintf(c, "HTTP/1.1 404 Not Found\r\n\r\n");
return;
@@ -68,7 +68,7 @@ int main(int argc, char **argv) {
const char *path = (argc > 1) ? argv[1] : "/net/listen/0.0.0.0/tcp/80";
handle_t conn;
for (;;) {
- conn = _syscall_open(path, strlen(path), 0);
+ conn = _syscall_open(path, strlen(path), OPEN_RW);
if (conn < 0) {
eprintf("open('%s') failed, %d", path, conn);
return 1;