* Avoid using '&' in URIs for resized images, to avoid client compatibility issues.
This commit is contained in:
parent
e925174081
commit
aba116a445
@ -1321,7 +1321,7 @@ SendResp_resizedimg(struct upnphttp * h, char * object)
|
||||
path = strdup(object);
|
||||
if( strtok_r(path, "?", &saveptr) )
|
||||
{
|
||||
item = strtok_r(NULL, "&", &saveptr);
|
||||
item = strtok_r(NULL, "&,", &saveptr);
|
||||
}
|
||||
while( item != NULL )
|
||||
{
|
||||
@ -1347,7 +1347,7 @@ SendResp_resizedimg(struct upnphttp * h, char * object)
|
||||
{
|
||||
pixelshape = val;
|
||||
}
|
||||
item = strtok_r(NULL, "&", &saveptr);
|
||||
item = strtok_r(NULL, "&,", &saveptr);
|
||||
}
|
||||
free(path);
|
||||
|
||||
|
@ -503,7 +503,7 @@ callback(void *args, int argc, char **argv, char **azColName)
|
||||
char str_buf[512];
|
||||
char **result;
|
||||
int children, ret = 0;
|
||||
static int warned = 0;
|
||||
static short int warned = 0;
|
||||
|
||||
/* Make sure we have at least 4KB left of allocated memory to finish the response. */
|
||||
if( passed_args->size > 1044480 && !warned )
|
||||
@ -720,7 +720,7 @@ callback(void *args, int argc, char **argv, char **azColName)
|
||||
passed_args->size += ret;
|
||||
ret = sprintf(str_buf, "<res resolution=\"%dx%d\" "
|
||||
"protocolInfo=\"http-get:*:%s:%s\">"
|
||||
"http://%s:%d/Resized/%s.jpg?width=%d&height=%d"
|
||||
"http://%s:%d/Resized/%s.jpg?width=%d,height=%d"
|
||||
"</res>",
|
||||
dstw, dsth,
|
||||
mime, "DLNA.ORG_PN=JPEG_SM", lan_addr[0].str, runtime_vars.port,
|
||||
|
Loading…
x
Reference in New Issue
Block a user