diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1997-08-17 13:18:55 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1997-08-17 13:18:55 -0400 |
commit | fbcb509d8db6255777742b09da479531108aa8d0 (patch) | |
tree | f1b14aa04f7c8eee2464f4575113db0c4c680900 /WWW/Library/Implementation/HTMIME.c | |
parent | 050803d49a91559644e86a4ed38f11ba0afffbe4 (diff) | |
download | lynx-snapshots-fbcb509d8db6255777742b09da479531108aa8d0.tar.gz |
snapshot of project "lynx", label v2-7-1ac_0-52
Diffstat (limited to 'WWW/Library/Implementation/HTMIME.c')
-rw-r--r-- | WWW/Library/Implementation/HTMIME.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index 2b9e31e4..60645dee 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -972,7 +972,7 @@ PRIVATE void HTMIME_put_character ARGS2( } /* switch on character */ break; - case miS: /* Check for 'a; or 'e' */ + case miS: /* Check for 'a' or 'e' */ switch (c) { case 'a': case 'A': @@ -1565,25 +1565,24 @@ PRIVATE void HTMIME_put_character ARGS2( */ StrAllocCopy(me->anchor->content_disposition, me->value); /* - ** If it includes file; filename=name.suffix - ** load the me->SugFname element. - FM + ** It's not clear yet from existing RFCs and IDs + ** whether we should be looking for file;, attachment;, + ** and/or inline; before the filename=value, so we'll + ** just search for "filename" followed by '=' and just + ** hope we get the intended value. It is purely a + ** suggested name, anyway. - FM */ cp = me->anchor->content_disposition; - while (*cp != '\0' && strncasecomp(cp, "file;", 5)) - cp++; - if (*cp == '\0') - break; - cp += 5; - while (*cp != '\0' && WHITE(*cp)) + while (*cp != '\0' && strncasecomp(cp, "filename", 8)) cp++; if (*cp == '\0') break; - while (*cp != '\0' && strncasecomp(cp, "filename", 8)) + cp += 8; + while ((*cp != '\0') && (WHITE(*cp) || *cp == '=')) cp++; if (*cp == '\0') break; - cp += 8; - while (*cp == ' ' || *cp == '=') + while (*cp != '\0' && WHITE(*cp)) cp++; if (*cp == '\0') break; |