diff --git a/src/kits/network/libnetapi/GopherRequest.cpp b/src/kits/network/libnetapi/GopherRequest.cpp index 64b8013f79..70d44af03b 100644 --- a/src/kits/network/libnetapi/GopherRequest.cpp +++ b/src/kits/network/libnetapi/GopherRequest.cpp @@ -327,12 +327,14 @@ BGopherRequest::_ProtocolLoop() fListener->HeadersReceived(this); // 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++) { if (gopher_type_map[i].type == fItemType) { - fResult.SetContentType(gopher_type_map[i].mime); + mime = gopher_type_map[i].mime; break; } } + fResult.SetContentType(mime); } if (_NeedsParsing())