#include "util/net/http_multipart_builder.h"
#include <string.h>
#include <sys/types.h>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
#include "util/net/http_body.h"
#include "util/net/http_body_gzip.h"
namespace crashpad {
namespace {
constexpr char kCRLF[] = …;
constexpr char kBoundaryCRLF[] = …;
std::string GenerateBoundaryString() { … }
std::string EncodeMIMEField(const std::string& name) { … }
std::string GetFormDataBoundary(const std::string& boundary,
const std::string& name) { … }
void AssertSafeMIMEType(const std::string& string) { … }
}
HTTPMultipartBuilder::HTTPMultipartBuilder()
: … { … }
HTTPMultipartBuilder::~HTTPMultipartBuilder() { … }
void HTTPMultipartBuilder::SetGzipEnabled(bool gzip_enabled) { … }
void HTTPMultipartBuilder::SetFormData(const std::string& key,
const std::string& value) { … }
void HTTPMultipartBuilder::SetFileAttachment(
const std::string& key,
const std::string& upload_file_name,
FileReaderInterface* reader,
const std::string& content_type) { … }
std::unique_ptr<HTTPBodyStream> HTTPMultipartBuilder::GetBodyStream() { … }
void HTTPMultipartBuilder::PopulateContentHeaders(
HTTPHeaders* http_headers) const { … }
void HTTPMultipartBuilder::EraseKey(const std::string& key) { … }
}