diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b9b6724..1770c27f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 51 + +* Fix operator<< for header + +-------------------------------------------------------------------------------- + Version 50 * parser is constructible from other body types diff --git a/include/beast/http/impl/write.ipp b/include/beast/http/impl/write.ipp index 2c757634..5742eed2 100644 --- a/include/beast/http/impl/write.ipp +++ b/include/beast/http/impl/write.ipp @@ -813,15 +813,25 @@ public: } // detail -#if 0 -template +template std::ostream& operator<<(std::ostream& os, - header const& msg) + header const& h) { - // VFALCO TODO + typename Fields::reader fr{ + h, h.version, h.method()}; + return os << buffers(fr.get()); +} + +template +std::ostream& +operator<<(std::ostream& os, + header const& h) +{ + typename Fields::reader fr{ + h, h.version, h.result_int()}; + return os << buffers(fr.get()); } -#endif template std::ostream&