diff options
-rw-r--r-- | README | 25 | ||||
-rw-r--r-- | src/daemon/session.c | 10 |
2 files changed, 17 insertions, 18 deletions
@@ -1,18 +1,19 @@ | |||
1 | Run "autoreconf -f -i" to create configure. | 1 | Run "autoreconf -f -i" to create configure. |
2 | 2 | ||
3 | This is still pre-alpha software. The following | 3 | This is still pre-alpha software. The following |
4 | things need to be implemented before it can be used | 4 | things need to be implemented (in list of importance) |
5 | at all: | 5 | before certain features can be used at all: |
6 | 6 | ||
7 | 7 | ||
8 | 8 | For ANYTHING: | |
9 | In general: | 9 | ============= |
10 | =========== | ||
11 | session.c: | 10 | session.c: |
12 | - MHD_session_get_fdset (essentially not implemented) | 11 | - MHD_session_get_fdset (essentially not implemented) |
13 | - MHD_find_access_handler (not implemented) | ||
14 | - add additional LOG messages for debugging | ||
15 | 12 | ||
13 | For GET args: | ||
14 | ============= | ||
15 | session.c: | ||
16 | - MHD_parse_session_headers: take URL apart | ||
16 | 17 | ||
17 | For PUT/POST: | 18 | For PUT/POST: |
18 | ============= | 19 | ============= |
@@ -20,28 +21,18 @@ session.c: | |||
20 | - MHD_parse_session_headers (determine upload size) | 21 | - MHD_parse_session_headers (determine upload size) |
21 | - MHD_session_handle_read (proper handling of upload end) | 22 | - MHD_session_handle_read (proper handling of upload end) |
22 | 23 | ||
23 | |||
24 | For COOKIES: | 24 | For COOKIES: |
25 | ============ | 25 | ============ |
26 | session.c: | 26 | session.c: |
27 | - MHD_parse_session_headers: take cookie header apart | 27 | - MHD_parse_session_headers: take cookie header apart |
28 | 28 | ||
29 | |||
30 | For GET args: | ||
31 | ============= | ||
32 | session.c: | ||
33 | - MHD_parse_session_headers: take URL apart | ||
34 | |||
35 | |||
36 | For IPv6: | 29 | For IPv6: |
37 | ========= | 30 | ========= |
38 | |||
39 | daemon.c: | 31 | daemon.c: |
40 | - fix start daemon and accept handlers | 32 | - fix start daemon and accept handlers |
41 | (tricky bit will be supporting both on | 33 | (tricky bit will be supporting both on |
42 | the same socket / port!) | 34 | the same socket / port!) |
43 | 35 | ||
44 | |||
45 | For SSL: | 36 | For SSL: |
46 | ======== | 37 | ======== |
47 | microhttpd.h: | 38 | microhttpd.h: |
diff --git a/src/daemon/session.c b/src/daemon/session.c index 62e05edd..fc713137 100644 --- a/src/daemon/session.c +++ b/src/daemon/session.c | |||
@@ -282,7 +282,15 @@ MHD_parse_session_headers(struct MHD_Session * session) { | |||
282 | */ | 282 | */ |
283 | static struct MHD_Access_Handler * | 283 | static struct MHD_Access_Handler * |
284 | MHD_find_access_handler(struct MHD_Session * session) { | 284 | MHD_find_access_handler(struct MHD_Session * session) { |
285 | /* FIXME: do real lookup based on URI! */ | 285 | struct MHD_Access_Handler * pos; |
286 | |||
287 | pos = session->daemon->handlers; | ||
288 | while (pos != NULL) { | ||
289 | if (0 == strcmp(session->url, | ||
290 | pos->uri_prefix)) | ||
291 | return pos; | ||
292 | pos = pos->next; | ||
293 | } | ||
286 | return &session->daemon->default_handler; | 294 | return &session->daemon->default_handler; |
287 | } | 295 | } |
288 | 296 | ||