Closed Bug 1258588 Opened 7 years ago Closed 7 years ago

Should the guessed MIME Type be set for Web Manifest?

Categories

(Core :: DOM: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: marcosc, Assigned: marcosc)

References

Details

(Whiteboard: [domsecurity-active])

In nsContentSecurityManager.cpp, it currently creates an EmptyCString for the typ:

    case nsIContentPolicy::TYPE_WEB_MANIFEST: {
      mimeTypeGuess = EmptyCString();
      requestingContext = aLoadInfo->LoadingNode();
      break;
    }

However, Web Manifest has a well-known/standardized type (application/manifest+json) [1]. Would it be helpful for the above code to "guess" that? 


[1] https://w3c.github.io/manifest/#media-type-registration
Flags: needinfo?(mozilla)
Yes, that should indeed happen and is useful. We should add the mimeType and land everything within Bug 1250048. Consider this as an r+ for that addition. Thanks!

>  case nsIContentPolicy::TYPE_WEB_MANIFEST: {
>      mimeTypeGuess = NS_LITERAL_CSTRING("application/manifest+json");
>      requestingContext = aLoadInfo->LoadingNode();
>      break;
>    }
Flags: needinfo?(mozilla)
Assignee: nobody → mcaceres
Blocks: 1250048
Status: NEW → ASSIGNED
Whiteboard: [domsecurity-active]
Was fixed as part of bug 1250048.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.