Refine the connection close
This commit is contained in:
+6
-4
@@ -85,10 +85,12 @@ void Message::SetContentType(const std::string& media_type,
|
||||
const std::string& charset) {
|
||||
using headers::kContentType;
|
||||
|
||||
if (charset.empty()) {
|
||||
SetHeader(kContentType, media_type);
|
||||
} else {
|
||||
SetHeader(kContentType, media_type + "; charset=" + charset);
|
||||
if (!media_type.empty()) {
|
||||
if (charset.empty()) {
|
||||
SetHeader(kContentType, media_type);
|
||||
} else {
|
||||
SetHeader(kContentType, media_type + "; charset=" + charset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user