Overview
Comment: | Added basic support for HTTP responses |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
7dfe29c1bc36cef488f5161e451d29df |
User & Date: | rkeene on 2014-02-04 09:53:18 |
Other Links: | manifest | tags |
Context
2014-02-04
| ||
10:18 | Added basic support for HTTP requests check-in: 4bbee8f607 user: rkeene tags: trunk | |
09:53 | Added basic support for HTTP responses check-in: 7dfe29c1bc user: rkeene tags: trunk | |
07:43 | Implemented basic stubs for sending files check-in: bdec14db58 user: rkeene tags: trunk | |
Changes
Modified filed.c from [263f67c7ab] to [a1927fba4d].
︙ | |||
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | + + + + + + - + + + + + + + + + + + + - + | /* XXX:TODO: Unimplemented */ return(0); } struct filed_fileinfo { int fd; size_t len; char *lastmod; char *type; }; static struct filed_fileinfo *filed_open_file(const char *path, struct filed_fileinfo *buffer) { /* XXX:TODO: Cache file descriptors */ off_t len; int fd; fd = open(path, O_RDONLY); if (fd < 0) { return(NULL); } len = lseek(fd, 0, SEEK_END); lseek(fd, 0, SEEK_SET); buffer->fd = fd; buffer->len = len; /* XXX:TODO: Determine */ buffer->type = "text/plain"; buffer->lastmod = "Now"; return(buffer); } static char *filed_get_http_request(FILE *fp, char *buffer, size_t buffer_len) { |
︙ |