# std.http.Client: eliminate arena allocator usage · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/651aa5e8e497a12dc14d31f383777f99b92a2739)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 651aa5e8e497a12dc14d31f383777f99b92a2739

Requested commit: 651aa5e8e497a12dc14d31f383777f99b92a2739

Commit: 651aa5e8e497a12dc14d31f383777f99b92a2739

Tree: 458ebb9f05ec821747a2f3267b4def1fab085db0

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.http.Client: eliminate arena allocator usage

Before, this code constructed an arena allocator and then used it when
handling redirects.

You know what's better than having threads fight over an allocator?
Avoiding dynamic memory allocation in the first place.

This commit reuses the http headers static buffer for handling
redirects. The new location is copied to the beginning of the static
header buffer and then the subsequent request uses a subslice of that
buffer.

```

## Parents

- [107992d50e6a07d98b325f8768882f17e454b4a4](https://git.cafe/gitcafe/zig/commit/107992d50e6a07d98b325f8768882f17e454b4a4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/651aa5e8e497a12dc14d31f383777f99b92a2739?format=markdown)
