mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::http: Write fixed sized integer for chunk size.
This commit is contained in:
parent
679f3e760a
commit
ef0a3d6e6c
2 changed files with 5 additions and 5 deletions
|
@ -32,8 +32,8 @@ namespace ircd::http
|
|||
void write(window_buffer &, const vector_view<const header> &);
|
||||
size_t serialized(const vector_view<const header> &);
|
||||
std::string strung(const vector_view<const header> &);
|
||||
void writechunk(window_buffer &, const size_t &size);
|
||||
const_buffer writechunk(const mutable_buffer &, const size_t &size);
|
||||
void writechunk(window_buffer &, const uint32_t &size);
|
||||
const_buffer writechunk(const mutable_buffer &, const uint32_t &size);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -598,7 +598,7 @@ ircd::http::parser::content_length(const string_view &str)
|
|||
|
||||
ircd::const_buffer
|
||||
ircd::http::writechunk(const mutable_buffer &buf,
|
||||
const size_t &chunk_size)
|
||||
const uint32_t &chunk_size)
|
||||
{
|
||||
window_buffer wb{buf};
|
||||
writechunk(wb, chunk_size);
|
||||
|
@ -607,11 +607,11 @@ ircd::http::writechunk(const mutable_buffer &buf,
|
|||
|
||||
void
|
||||
ircd::http::writechunk(window_buffer &buf,
|
||||
const size_t &chunk_size)
|
||||
const uint32_t &chunk_size)
|
||||
{
|
||||
writeline(buf, [&chunk_size](const mutable_buffer &out) -> size_t
|
||||
{
|
||||
return ::snprintf(data(out), size(out), "%lx", chunk_size);
|
||||
return ::snprintf(data(out), size(out), "%08x", chunk_size);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue