Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Add filename* for a download name past ASCII
The plain, snapshot and blob pages sent a name such as café.txt raw in
filename, which a client may read as ISO-8859-1. RFC 6266 has such a
name sent again as filename*, percent-encoded in UTF-8, for a client
that knows the form, with filename first for one that does not. The
extended form carries UTF-8 alone, so a name that is not valid UTF-8
keeps the plain filename by itself.
Diffstat (limited to 'source/html.h')
| -rw-r--r-- | source/html.h | 7 |
1 file changed, 7 insertions, 0 deletions
diff --git a/source/html.h b/source/html.h index 4c16f85..1accb37 100644 --- a/source/html.h +++ b/source/html.h @@ -93,6 +93,13 @@ extern void html_attr_url(const char *txt); extern void html_url_arg(const char *txt); extern void html_header_arg_in_quotes(const char *txt); + +/* + * Percent-encode txt as the value of an RFC 8187 header parameter such as + * filename*, leaving out the charset and language the value opens with. + */ +extern void html_header_ext_value(const char *txt); + extern void html_header_query(const char *txt); extern void html_hidden(const char *name, const char *value); |
