gopher: Set a default MIME type to force downloading

This commit is contained in:
François Revol
2014-07-26 01:45:40 +02:00
parent cf2bf30633
commit e95d0f00ce
+3 -1
View File
@@ -327,12 +327,14 @@ BGopherRequest::_ProtocolLoop()
fListener->HeadersReceived(this); fListener->HeadersReceived(this);
// now we can assign MIME type if we know it // now we can assign MIME type if we know it
const char *mime = "application/octet-stream";
for (i = 0; gopher_type_map[i].type != GOPHER_TYPE_NONE; i++) { for (i = 0; gopher_type_map[i].type != GOPHER_TYPE_NONE; i++) {
if (gopher_type_map[i].type == fItemType) { if (gopher_type_map[i].type == fItemType) {
fResult.SetContentType(gopher_type_map[i].mime); mime = gopher_type_map[i].mime;
break; break;
} }
} }
fResult.SetContentType(mime);
} }
if (_NeedsParsing()) if (_NeedsParsing())