summaryrefslogtreecommitdiffstats
path: root/src/HTTP/TransferEncodingParser.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2023-05-11 22:05:17 +0200
committerMattes D <github@xoft.cz>2023-05-16 23:50:37 +0200
commitc9522fb740200ccef6230cec452c48efb31e5394 (patch)
tree7e74d70699e13dd0a92444a1a0add7a3059ac7ca /src/HTTP/TransferEncodingParser.cpp
parentTry a timeout for jobs. (diff)
downloadcuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.gz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.bz2
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.lz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.xz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.zst
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.zip
Diffstat (limited to 'src/HTTP/TransferEncodingParser.cpp')
-rw-r--r--src/HTTP/TransferEncodingParser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/HTTP/TransferEncodingParser.cpp b/src/HTTP/TransferEncodingParser.cpp
index 98d870460..925c919d3 100644
--- a/src/HTTP/TransferEncodingParser.cpp
+++ b/src/HTTP/TransferEncodingParser.cpp
@@ -120,7 +120,7 @@ protected:
}
default:
{
- Error(Printf("Invalid character in chunk length line: 0x%x", a_Data[i]));
+ Error(fmt::format(FMT_STRING("Invalid character in chunk length line: 0x{:02x}"), a_Data[i]));
return AString::npos;
}
} // switch (a_Data[i])
@@ -150,7 +150,7 @@ protected:
if (a_Data[i] < 32)
{
// Only printable characters are allowed in the trailer
- Error(Printf("Invalid character in chunk length line: 0x%x", a_Data[i]));
+ Error(fmt::format(FMT_STRING("Invalid character in chunk length line: 0x{:02x}"), a_Data[i]));
return AString::npos;
}
}
@@ -183,7 +183,7 @@ protected:
}
return 1;
}
- Error(Printf("Invalid character past chunk length's CR: 0x%x", a_Data[0]));
+ Error(fmt::format(FMT_STRING("Invalid character past chunk length's CR: 0x{:02x}"), a_Data[0]));
return AString::npos;
}
@@ -219,7 +219,7 @@ protected:
m_State = psChunkDataLF;
return 1;
}
- Error(Printf("Invalid character past chunk data: 0x%x", a_Data[0]));
+ Error(fmt::format(FMT_STRING("Invalid character past chunk data: 0x{:02x}"), a_Data[0]));
return AString::npos;
}
@@ -241,7 +241,7 @@ protected:
m_State = psChunkLength;
return 1;
}
- Error(Printf("Invalid character past chunk data's CR: 0x%x", a_Data[0]));
+ Error(fmt::format(FMT_STRING("Invalid character past chunk data's CR: 0x{:02x}"), a_Data[0]));
return AString::npos;
}
@@ -292,11 +292,11 @@ protected:
return a_Size;
}
- virtual void Finish(void) override
+ virtual void Finish() override
{
if (m_State != psFinished)
{
- Error(Printf("ChunkedTransferEncoding: Finish signal received before the data stream ended (state: %d)", m_State));
+ Error(fmt::format(FMT_STRING("ChunkedTransferEncoding: Finish signal received before the data stream ended (state: {})"), m_State));
}
m_State = psFinished;
}