78 const char *s = r->args;
80 register unsigned short i;
88 p = ap_getword(r->pool, &s,
'&');
89 if (!strncmp(p,
"action=", 7)) {
92 if (!strcmp(p,
"randomdir")) {
98 if (!strcmp(p,
"tarball")) {
107 if (!strcmp(p,
"playall")) {
114 if (!strcmp(p,
"RSS")) {
122 else if (!strcmp(p,
"podcast")) {
131 else if (!strncmp(p,
"sort=", 5)) {
134 for (i =
SB_MAX; i > 0; i--)
138 else if (!strncmp(p,
"option=", 7)) {
140 if (!strcmp(p,
"recursive"))
142 else if (!strcmp(p,
"shuffle")) {
146 else if (!strcmp(p,
"quick"))
149 else if (!strncmp(p,
"limit=", 6)) {
174 const char *s = NULL;
178 ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK);
181 i = ap_get_client_block(r, buffer,
MAX_STRING-1);
192 p = strstr(s,
"&search=");
196 else if (strncmp(s,
"search=", 7) == 0)
201 conf->
search = ap_getword(r->pool, &p,
'&');
202 for (i=0; p[i]; i++) {
204 if (conf->
search[i] ==
'+')
207 ap_unescape_url(conf->
search);
211 p = strstr(s,
"&sort=");
215 else if (strncmp(s,
"sort=", 5) == 0)
222 for (i = 0; p[i] && (p[i] !=
'&') && (i <
SB_MAX); i++)
228 p = strstr(s,
"&action=");
232 else if (strncmp(s,
"action=", 7) == 0)
238 p = ap_getword(r->pool, &p,
'&');
241 if (!strcmp(p,
"Search")) {
245 else if (!strcmp(p,
"RecursiveSearch")) {
260 if (!strcmp(p,
"PlaySelected")) {
262 }
else if (!strcmp(p,
"PlayAll")) {
264 }
else if (!strcmp(p,
"ShuffleAll")) {
272 if (!strcmp(p,
"DownloadAll")) {
274 }
else if (!strcmp(p,
"DownloadSelected")) {
280 if (!strcmp(p,
"AddToPlaylist")) {
282 }
else if (!strcmp(p,
"AddAllToPlaylist")) {
287 if (!strcmp(p,
"RemoveFromPlaylist")) {
289 }
else if (!strcmp(p,
"ClearPlaylist")) {
291 }
else if (!strcmp(p,
"StreamPlaylist")) {
293 }
else if (!strcmp(p,
"DownloadPlaylist")) {
301 const char *cookie = NULL, *playlist_cookie = NULL;
305 playlist_cookie = strstr(cookie,
"playlist=");
307 playlist_cookie = ap_getword(subpool, &playlist_cookie,
';');
310 return playlist_cookie;
315 const char *playlist = NULL;
338 const char *new_cookie_string = NULL;
345 p = ap_getword(subpool, &args,
'&');
346 if (strncmp(p,
"file=", 5))
352 if (strstr(new_cookie_string, p) == NULL)
353 new_cookie_string =
apr_pstrcat(subpool, new_cookie_string, p,
"&", NULL);
355 return new_cookie_string;
372 const mu_ent *custom = NULL;
373 const char *new_cookie_string = NULL;
374 char *codeduri = NULL;
388 for (custom = cookie_pack.
fhead; custom; custom = custom->
next) {
394 if (strstr(new_cookie_string, codeduri) == NULL)
395 new_cookie_string =
apr_pstrcat(subpool, new_cookie_string, codeduri,
"&", NULL);
399 return new_cookie_string;
418 const char *new_cookie_string = NULL, *p = NULL, *args;
426 args = strstr(args,
"playlist=");
436 ap_unescape_url(rlist);
440 new_cookie_string =
apr_pstrdup(subpool,
"playlist=");
444 while ((*args !=
'\0') && (*args !=
';')) {
445 p = ap_getword(subpool, &args,
'&');
448 if (strstr(rlist, p) == NULL)
449 new_cookie_string =
apr_pstrcat(subpool, new_cookie_string, p,
"&", NULL);
452 return new_cookie_string;
458 const char *end_string = NULL, *args = NULL;
491 end_string =
apr_psprintf(subpool,
"; Version=1; Max-Age=%d; Path=/",
499 if (subpool != r->pool)