diff options
| author | 2024-08-22 10:26:43 +0100 | |
|---|---|---|
| committer | 2024-08-22 11:12:52 +0100 | |
| commit | 6b123d4bc61c2db8e379dd5e681834c4053e661d (patch) | |
| tree | 77621bb30f54b0c444e31a78b2c5c9a67955b723 /modules/httpd.cpp | |
| parent | Merge branch 'insp4' into master. (diff) | |
Use C++20 <format> instead of fmtlib when available.
Diffstat (limited to 'modules/httpd.cpp')
| -rw-r--r-- | modules/httpd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/httpd.cpp b/modules/httpd.cpp index de80b63ed..156be2fe3 100644 --- a/modules/httpd.cpp +++ b/modules/httpd.cpp @@ -258,7 +258,7 @@ public: ServerInstance->Logs.Debug(MODNAME, "Sending HTTP error {}: {}", response, errstr); static HTTPHeaders empty; - std::string data = fmt::format( + std::string data = FMT::format( "<html><head></head><body style='font-family: sans-serif; text-align: center'>" "<h1 style='font-size: 48pt'>Error {}</h1><h2 style='font-size: 24pt'>{}</h2><hr>" "<small>Powered by <a href='https://www.inspircd.org'>InspIRCd</a></small></body></html>", @@ -269,7 +269,7 @@ public: void SendHeaders(unsigned long size, unsigned int response, HTTPHeaders& rheaders) { - WriteData(fmt::format("HTTP/{}.{} {} {}\r\n", parser.http_major ? parser.http_major : 1, parser.http_major ? parser.http_minor : 1, response, http_status_str((http_status)response))); + WriteData(FMT::format("HTTP/{}.{} {} {}\r\n", parser.http_major ? parser.http_major : 1, parser.http_major ? parser.http_minor : 1, response, http_status_str((http_status)response))); rheaders.CreateHeader("Date", Time::ToString(ServerInstance->Time(), "%a, %d %b %Y %H:%M:%S GMT", true)); rheaders.CreateHeader("Server", INSPIRCD_BRANCH); |
