> ## 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_* 会话设置

> http_* 自动生成分组中的 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_connection_timeout">
  ## http\_connection\_timeout
</div>

<SettingsInfoBlock type="Seconds" default_value="1" />

HTTP 连接超时时间 (以秒为单位) 。

可能的值：

* 任意正整数。
* 0 - 禁用 (超时时间为无限) 。

<div id="http_make_head_request">
  ## http\_make\_head\_request
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

`http_make_head_request` 设置允许在通过 HTTP 读取数据时执行 `HEAD` 请求，以获取待读取文件的信息，例如文件大小。该设置默认启用，因此如果服务器不支持 `HEAD` 请求，可能需要将其禁用。

<div id="http_native_compression_disable_checksumming_on_decompress">
  ## http\_native\_compression\_disable\_checksumming\_on\_decompress
</div>

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

启用或禁用在解压来自客户端的 HTTP POST 数据时进行校验和检查。仅适用于 ClickHouse 原生压缩格式 (不用于 `gzip` 或 `deflate`) 。

如需了解更多信息，请参阅 [HTTP 接口说明](/docs/zh/concepts/features/interfaces/http)。

可能的值：

* 0 — 禁用。
* 1 — 启用。

<div id="http_receive_timeout">
  ## http\_receive\_timeout
</div>

<SettingsInfoBlock type="Seconds" default_value="30" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.6"},{"label": "30"},{"label": "请参见 http_send_timeout。"}]}]} />

HTTP 接收超时时间 (秒) 。

可能的取值：

* 任意正整数。
* 0 - 禁用 (无限超时) 。

<div id="http_send_timeout">
  ## http\_send\_timeout
</div>

<SettingsInfoBlock type="Seconds" default_value="30" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.6"},{"label": "30"},{"label": "3 分钟似乎长得离谱。请注意，这是单次网络写入调用的超时，而不是整个上传操作的超时。"}]}]} />

HTTP 发送超时 (以秒为单位) 。

可能的值：

* 任何正整数。
* 0 - 禁用 (无限超时) 。

<Note>
  仅适用于 default profile。更改生效需要重启 server。
</Note>

<div id="http_skip_not_found_url_for_globs">
  ## http\_skip\_not\_found\_url\_for\_globs
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

跳过返回 HTTP\_NOT\_FOUND 错误的通配符 URL

<div id="http_wait_end_of_query">
  ## http\_wait\_end\_of\_query
</div>

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

启用服务器端 HTTP 响应缓冲。

<div id="http_write_exception_in_output_format">
  ## http\_write\_exception\_in\_output\_format
</div>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.11"},{"label": "0"},{"label": "为保持各格式之间的一致性而更改"}]}, {"id": "row-2","items": [{"label": "23.9"},{"label": "1"},{"label": "在 HTTP streaming 中发生异常时输出有效的 JSON/XML。"}]}]} />

将异常按输出格式写出，以生成有效的输出。适用于 JSON 和 XML 格式。

<div id="http_zlib_compression_level">
  ## http\_zlib\_compression\_level
</div>

<SettingsInfoBlock type="Int64" default_value="3" />

如果 [enable\_http\_compression = 1](/docs/zh/reference/settings/session-settings/enable#enable_http_compression)，则设置 HTTP 请求响应中的数据压缩级别。

可能的值：1 到 12 的数值。高于 `9` 的级别需要使用包含 `libdeflate` 的默认构建版本；不包含 `libdeflate` 的构建版本支持 1 到 9 级。
