# Uri: propagate per-component encoding · gitcafe/zig

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

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

Visibility: public

Requested revision: c4587dc9f46e15d4fb875a7675bc1aa22138c1ab

Requested commit: c4587dc9f46e15d4fb875a7675bc1aa22138c1ab

Commit: c4587dc9f46e15d4fb875a7675bc1aa22138c1ab

Tree: fff3520b8a9ba7492b7ac1d35a5290c535c50ba5

Author: Jacob Young

Committer: Andrew Kelley

## Message

```
Uri: propagate per-component encoding

This allows `std.Uri.resolve_inplace` to properly preserve the fact
that `new` is already escaped but `base` may not be.  I originally tried
just moving `raw_uri` around, but it made uri resolution unmanagably
complicated, so I instead added per-component information to `Uri` which
allows extra allocations to be avoided when constructing uris with
components from different sources, and in some cases, deferring the work
all the way to when the uri is printed, where an allocator may not even
be needed.

Closes #19587

```

## Parents

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

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