mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Document parse_content_disposition.
This commit is contained in:
parent
1ba17daf39
commit
a46aa44f57
@ -1,3 +1,7 @@
|
|||||||
|
2006-04-08 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* http.c (parse_content_disposition): Doc fix.
|
||||||
|
|
||||||
2006-03-15 Mauro Tortonesi <mauro@ferrara.linux.it>
|
2006-03-15 Mauro Tortonesi <mauro@ferrara.linux.it>
|
||||||
|
|
||||||
* utils.c: Restricted operational semantics of frontcmp and proclist
|
* utils.c: Restricted operational semantics of frontcmp and proclist
|
||||||
|
17
src/http.c
17
src/http.c
@ -932,6 +932,23 @@ extract_param (const char **source, param_token *name, param_token *value,
|
|||||||
#undef MAX
|
#undef MAX
|
||||||
#define MAX(p, q) ((p) > (q) ? (p) : (q))
|
#define MAX(p, q) ((p) > (q) ? (p) : (q))
|
||||||
|
|
||||||
|
/* Parse the contents of the `Content-Disposition' header, extracting
|
||||||
|
the information useful to Wget. Content-Disposition is a header
|
||||||
|
borrowed from MIME; when used in HTTP, it typically serves for
|
||||||
|
specifying the desired file name of the resource. For example:
|
||||||
|
|
||||||
|
Content-Disposition: attachment; filename="flora.jpg"
|
||||||
|
|
||||||
|
Wget will skip the tokens it doesn't care about, such as
|
||||||
|
"attachment" in the previous example; it will also skip other
|
||||||
|
unrecognized params. If the header is syntactically correct and
|
||||||
|
contains a file name, a copy of the file name is stored in
|
||||||
|
*filename and true is returned. Otherwise, the function returns
|
||||||
|
false.
|
||||||
|
|
||||||
|
The file name is stripped of directory components and must not be
|
||||||
|
empty. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
parse_content_disposition (const char *hdr, char **filename)
|
parse_content_disposition (const char *hdr, char **filename)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user