gopher: Set a default MIME type to force downloading
This commit is contained in:
@@ -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())
|
||||||
|
|||||||
Reference in New Issue
Block a user