summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterurlentry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterurlentry.cpp')
-rw-r--r--indra/newview/llfloaterurlentry.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 7651b2528f..2f1857ec61 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -242,6 +242,16 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle<LLFloater> pa
resolvedMimeType = mimeType;
}
}
+ else if (resultHeaders.has(HTTP_IN_HEADER_X_CONTENT_TYPE_OPTIONS))
+ {
+ const std::string& val = resultHeaders[HTTP_IN_HEADER_X_CONTENT_TYPE_OPTIONS];
+ if (val == HTTP_NOSNIFF)
+ {
+ // Doesn't permit 'sniffing' mime type, default to either html or plain
+ // If this doesn't work user will have to choose something manually.
+ resolvedMimeType = HTTP_CONTENT_TEXT_HTML;
+ }
+ }
floaterUrlEntry->headerFetchComplete(status.getType(), resolvedMimeType);