std: fix bug in http.headers where .put captures user-held variable

master
daurnimator 2020-01-11 00:08:54 +11:00
parent 7a1cde7206
commit 65013d8599
No known key found for this signature in database
GPG Key ID: 45B429A8F9D9D22A
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ pub const Headers = struct {
var dex = HeaderIndexList.init(self.allocator);
try dex.append(n - 1);
errdefer dex.deinit();
_ = try self.index.put(name, dex);
_ = try self.index.put(name_dup, dex);
}
self.data.appendAssumeCapacity(entry);
}