git/list[1] front-page[2] threads[3] people[4] search[5] about
 

What happen if show_http_message fails to reencode?

From
Yi, EungJun <semtlenori@gmail.com>
Date
Apr 20, 2015, 06:29 UTC
Message-ID
<CAFT+Tg9x3QfS4c93Bs_Oq0zc7bXvZdFZQAKJFPtqbp6M=Q-P0g@mail.gmail.com>

I'm trying to make my git server sends http messages in non-ASCII encoding. And I have a question.

At 206-218 in remote-curl.c:
Show 13 quoted lines
> static int show_http_message(struct strbuf *type, struct strbuf *charset,
>                  struct strbuf *msg)
> {
>     const char *p, *eol;
>
>     /*
>      * We only show text/plain parts, as other types are likely
>      * to be ugly to look at on the user's terminal.
>      */
>     if (strcmp(type->buf, "text/plain"))
>         return -1;
>     if (charset->len)
>         strbuf_reencode(msg, charset->buf, get_log_output_encoding());

What happen if the message has a character which cannot be encoded by the encoding defined by i18n.logoutputencoding? Drops only the character or brakes the whole message?

-EungJun
Next: Junio C Hamano
Message 1 of 2 in “What happen if show_http_message fails to reencode?”
  1. Yi, EungJunApr 20, 2015
  2. Junio C HamanoApr 20, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.