> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# http_response_* 会话设置

> 位于 http_response_* 自动生成组中的 ClickHouse 会话设置。

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>类型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>默认值</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          无需重启即可更改
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

这些设置可在 [system.settings](/docs/zh/reference/system-tables/settings) 中查看，并由 [源代码](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="http_response_buffer_size">
  ## http\_response\_buffer\_size
</div>

<SettingsInfoBlock type="UInt64" default_value="0" />

在将 HTTP 响应发送给客户端或写入磁盘之前 (启用 http\_wait\_end\_of\_query 时) ，在服务器内存中缓冲的字节数。

<div id="http_response_headers">
  ## http\_response\_headers
</div>

<SettingsInfoBlock type="Map" default_value="{}" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.12"},{"label": ""},{"label": "新设置。"}]}]} />

允许添加或覆盖服务器在查询成功时随响应返回的 HTTP 请求头。
这仅影响 HTTP 接口。

如果该请求头默认已设置，则提供的值会覆盖它。
如果该请求头默认未设置，则会将其添加到请求头列表中。
服务器默认设置且未被此设置覆盖的请求头将保留不变。

此设置允许你将请求头设为固定值。目前还无法将请求头设为动态计算的值。

名称和值均不能包含 ASCII 控制字符。

如果你实现了一个允许用户修改设置、但同时又会根据返回的请求头作出决策的 UI 应用程序，建议将此设置限制为 readonly。

示例：`SET http_response_headers = $${'Content-Type': 'image/png'}$$`
