Skip to content

Commit

Permalink
Assume octet stream as a compressed sitemap (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marjani authored Apr 29, 2024
1 parent ce6ef3b commit 1f1e72e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TurnerSoftware.SitemapTools/SitemapQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ public async Task<IEnumerable<Uri>> DiscoverSitemapsAsync(string domainName, Can
var contentType = response.Content.Headers.ContentType.MediaType;
var requiresManualDecompression = false;

if (contentType.Equals("application/x-gzip", StringComparison.InvariantCultureIgnoreCase))
if (contentType.Equals("application/x-gzip", StringComparison.InvariantCultureIgnoreCase)||
contentType.Equals("application/octet-stream", StringComparison.InvariantCultureIgnoreCase))
{
requiresManualDecompression = true;
var baseFileName = Path.GetFileNameWithoutExtension(sitemapUrl.AbsolutePath);
Expand Down

0 comments on commit 1f1e72e

Please sign in to comment.