nghttpx: Make it simple to calculate length
This commit is contained in:
parent
dba0d2791c
commit
8c1e155f44
|
@ -423,7 +423,8 @@ ClientHandler::ClientHandler(Worker *worker, int fd, SSL *ssl,
|
||||||
auto buf = make_byte_ref(balloc_, len + 1);
|
auto buf = make_byte_ref(balloc_, len + 1);
|
||||||
auto p = buf.base;
|
auto p = buf.base;
|
||||||
*p++ = '_';
|
*p++ = '_';
|
||||||
p = util::random_alpha_digit(p, p + len - 1, worker_->get_randgen());
|
p = util::random_alpha_digit(p, p + SHRPX_OBFUSCATED_NODE_LENGTH,
|
||||||
|
worker_->get_randgen());
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
forwarded_for_ = StringRef{buf.base, p};
|
forwarded_for_ = StringRef{buf.base, p};
|
||||||
|
|
Loading…
Reference in New Issue