mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-01 11:52:54 +01:00
avoid multipart boundary conflict (#1753)
when nesting multipart, descendant parts currently may have the same boundary as the top-level multipart.
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
453d5248f1
commit
5b7d9d2b18
@@ -78,7 +78,7 @@ const std::string& MultipartWriter::boundary() const
|
||||
std::string MultipartWriter::createBoundary()
|
||||
{
|
||||
std::string boundary("MIME_boundary_");
|
||||
Random rnd;
|
||||
static Random rnd;
|
||||
NumberFormatter::appendHex(boundary, rnd.next(), 8);
|
||||
NumberFormatter::appendHex(boundary, rnd.next(), 8);
|
||||
return boundary;
|
||||
|
||||
Reference in New Issue
Block a user