Skip to content

assets/status returns empty mime type, fills console with "XML Parsing Error: syntax error" when auto-reload turned on. #63

@despian

Description

@despian

Operating System: macOS 10.15.7
Browser: Firefox 88.0.1 (64-bit)
Node Version: v12.18.1
powerbi-visuals-tools Version: 3.1.19
powerbi-visuals-webpack-plugin Version: 2.2.6

webpack-dev-server is unable to determine the correct mime type for the status file since there is no extension.

It returns the content header with no mime type: Content-Type: ; charset=UTF-8. By default, the browser treats this as text/html and tries to parse the content as HTML. This results in an "XML Parsing Error: syntax error" in the console.

When auto-reload is enabled the console gets filled with these errors, making it unusable for debugging/development.

image

I had a look at how webpack-dev-server determines the mime type and it doesn't seem possible to override it without an extension. The best option would probably be to just give the filename an extension e.g. status.txt it would then be served as text/plain and shouldn't trigger the XML parser error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions