Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
67a9efa3
...
67a9efa3986dcafc1c76f0d04ce21a63956a1b48
authored
2003-05-28 15:01:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(store_handler): Honor the "name" attribute of the Content-Type header.
1 parent
5c6c39ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
mh/mhn.c
mh/mhn.c
View file @
67a9efa
...
...
@@ -1579,12 +1579,13 @@ store_handler (message_t msg, msg_part_t part, char *type, char *encoding,
header_t
hdr
;
char
*
val
;
if
(
message_get_header
(
msg
,
&
hdr
)
==
0
&&
header_aget_value
(
hdr
,
MU_HEADER_CONTENT_DISPOSITION
,
&
val
)
==
0
)
if
(
message_get_header
(
msg
,
&
hdr
)
==
0
)
{
int
argc
;
char
**
argv
;
if
(
header_aget_value
(
hdr
,
MU_HEADER_CONTENT_DISPOSITION
,
&
val
)
==
0
)
{
if
(
argcv_get
(
val
,
"="
,
NULL
,
&
argc
,
&
argv
)
==
0
)
{
int
i
;
...
...
@@ -1603,6 +1604,30 @@ store_handler (message_t msg, msg_part_t part, char *type, char *encoding,
argcv_free
(
argc
,
argv
);
}
free
(
val
);
}
if
(
!
name
&&
header_aget_value
(
hdr
,
MU_HEADER_CONTENT_TYPE
,
&
val
)
==
0
)
{
if
(
argcv_get
(
val
,
"="
,
NULL
,
&
argc
,
&
argv
)
==
0
)
{
int
i
;
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
if
((
strcmp
(
argv
[
i
],
"filename"
)
==
0
||
strcmp
(
argv
[
i
],
"name"
)
==
0
)
&&
++
i
<
argc
&&
argv
[
i
][
0
]
==
'='
&&
++
i
<
argc
)
{
name
=
normalize_path
(
dir
,
argv
[
i
]);
break
;
}
}
argcv_free
(
argc
,
argv
);
}
free
(
val
);
}
}
}
...
...
Please
register
or
sign in
to post a comment