Project

General

Profile

Feature #1953 » lighttpd-git-allprop.patch

Interpret a PROPFIND with allprop as a request for all known live properties - mstorsjo, 2009-04-03 12:41

View differences:

src/mod_webdav.c
1328 1328
								}
1329 1329
							}
1330 1330
						} else if (0 == xmlStrcmp(cmd->name, BAD_CAST "allprop")) {
1331
							/* get all properties (EMPTY) */
1331
							const webdav_property* propptr = live_properties;
1332
							while (propptr->prop) {
1333
								/* add property to requested list */
1334
								if (req_props->size == 0) {
1335
									req_props->size = 16;
1336
									req_props->ptr = malloc(sizeof(*(req_props->ptr)) * req_props->size);
1337
								} else if (req_props->used == req_props->size) {
1338
									req_props->size += 16;
1339
									req_props->ptr = realloc(req_props->ptr, sizeof(*(req_props->ptr)) * req_props->size);
1340
								}
1341

  
1342
								req_props->ptr[req_props->used] = malloc(sizeof(webdav_property));
1343
								req_props->ptr[req_props->used]->ns = (char *)xmlStrdup((xmlChar *)(propptr->ns ? propptr->ns : ""));
1344
								req_props->ptr[req_props->used]->prop = (char *)xmlStrdup((xmlChar *)propptr->prop);
1345
								req_props->used++;
1346

  
1347
								propptr++;
1348
							}
1332 1349
						}
1333 1350
					}
1334 1351
				}
(1-1/4)