Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
83d95532
Commit
83d95532
authored
Mar 25, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow URL parameter of arbitrary size (closes #1125)
parent
331e3216
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
modules/control/http/http.h
modules/control/http/http.h
+2
-0
modules/control/http/rpn.c
modules/control/http/rpn.c
+12
-7
modules/control/http/util.c
modules/control/http/util.c
+19
-0
No files found.
modules/control/http/http.h
View file @
83d95532
...
...
@@ -128,6 +128,8 @@ void E_(HandleSeek)( intf_thread_t *p_intf, char *p_value );
char
*
E_
(
ExtractURIValue
)(
char
*
restrict
psz_uri
,
const
char
*
restrict
psz_name
,
char
*
restrict
psz_value
,
size_t
i_value_max
);
char
*
E_
(
ExtractURIString
)(
char
*
restrict
psz_uri
,
const
char
*
restrict
psz_name
);
/** \todo Describe this function */
int
E_
(
TestURIParam
)(
char
*
psz_uri
,
const
char
*
psz_name
);
...
...
modules/control/http/rpn.c
View file @
83d95532
...
...
@@ -349,14 +349,19 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
{
char
*
url
=
E_
(
mvar_GetValue
)(
vars
,
"url_value"
);
char
*
name
=
E_
(
SSPop
)(
st
);
char
value
[
2048
];
char
*
value
=
E_
(
ExtractURIString
)(
url
,
name
);
if
(
value
!=
NULL
)
{
char
*
tmp
;
E_
(
ExtractURIValue
)(
url
,
name
,
value
,
2048
);
decode_URI
(
value
);
tmp
=
E_
(
FromUTF8
)(
p_intf
,
value
);
E_
(
SSPush
)(
st
,
tmp
);
free
(
tmp
);
free
(
value
);
}
else
E_
(
SSPush
)(
st
,
""
);
free
(
name
);
}
else
if
(
!
strcmp
(
s
,
"url_encode"
)
)
...
...
modules/control/http/util.c
View file @
83d95532
...
...
@@ -793,6 +793,25 @@ char *E_(ExtractURIValue)( char *restrict psz_uri,
return
psz_next
;
}
char
*
E_
(
ExtractURIString
)(
char
*
restrict
psz_uri
,
const
char
*
restrict
psz_name
)
{
size_t
len
;
char
*
psz_value
=
FindURIValue
(
psz_uri
,
psz_name
,
&
len
);
if
(
psz_value
==
NULL
)
return
NULL
;
char
*
res
=
malloc
(
len
+
1
);
if
(
res
==
NULL
)
return
NULL
;
memcpy
(
res
,
psz_value
,
len
);
res
[
len
]
=
'\0'
;
return
res
;
}
/* Since the resulting string is smaller we can work in place, so it is
* permitted to have psz == new. new points to the first word of the
* string, the function returns the remaining string. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment