|
|
| version 1.1.1.1.2.2, 2012/03/09 10:03:21 | version 1.1.1.1.2.4, 2012/03/09 12:47:06 |
|---|---|
| Line 348 www_delPair(cgi_t * __restrict cgi, const char *name) | Line 348 www_delPair(cgi_t * __restrict cgi, const char *name) |
| } | } |
| /* | /* |
| * www_listPairs() - Walk over CGI session variables | |
| * | |
| * @cgi = Cgi session | |
| * @func = If !=NULL call function for each element | |
| * @arg = Optional argument pass through callback | |
| * return: -1 error or >-1 number of elements | |
| */ | |
| inline int | |
| www_listPairs(cgi_t * __restrict cgi, list_cb_t func, void *arg) | |
| { | |
| register int ret = 0; | |
| struct tagCGI *t; | |
| if (!cgi) { | |
| www_SetErr(EINVAL, "Invalid CGI session argument"); | |
| return -1; | |
| } | |
| SLIST_FOREACH(t, cgi, cgi_node) { | |
| ret++; | |
| if (func) | |
| func(t, arg); | |
| } | |
| return ret; | |
| } | |
| /* | |
| * www_header() - Output initial html header | * www_header() - Output initial html header |
| * | * |
| * @output = file handle | * @output = file handle |
| Line 495 www_parseMultiPart(const char *str, int ctlen, const c | Line 524 www_parseMultiPart(const char *str, int ctlen, const c |
| } | } |
| mime = mime_parseMultiPart(str, ctlen, www_getAttribute(attr, "boundary"), NULL); | mime = mime_parseMultiPart(str, ctlen, www_getAttribute(attr, "boundary"), NULL); |
| www_freeAttributes(&attr); | www_freeAttributes(&attr); |
| if (!mime) { | |
| www_closeCGI(&cgi); | |
| return NULL; | |
| } | |
| SLIST_FOREACH(m, mime, mime_node) { | SLIST_FOREACH(m, mime, mime_node) { |
| s = mime_getValue(m, "content-disposition"); | s = mime_getValue(m, "content-disposition"); |