question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hosted Images Being Returned as Text/XML

See original GitHub issue

Watson Webserver version: 2.1.3 .NET Framework: 4.6.2

We are having an issue where images in a directory that we host up via server.ContentRoutes.Add("/img/" + nameOfImage) are being returned with text/xml headers when our other application accesses them.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ekarkosApollocommented, Aug 5, 2019

Looks like this fixed the issue. Thanks again for the quick responses.

1reaction
jchristncommented, Aug 2, 2019

Ok you definitely found a bug.

I just tested using watson.jpg within a content route and it’s not setting the content-type.

I will investigate this ASAP. Thanks for letting me know! image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling images from XMLHttpRequest (with HTML and ...
The image is returned as a JPEG and the returned header shows "content-type= image/jpg". I can view the information via Firebug for Firefox....
Read more >
Exposed API - need to return "Content-Type" as "[text/xml]"
When I send a test from POSTman, I get that the header returned is "Content-Type" "text/plain" which means that my default it not...
Read more >
Returning Image/Media Data with Spring MVC
In this tutorial, we'll illustrate how to return images and other media using the Spring MVC framework. We will discuss several approaches, ...
Read more >
Returning an Image or a File with Spring
A quick and practical guide to returning an image in a Spring REST endpoint.
Read more >
Soap Request returns unsupported media type - Help
SOAP Request returns unsupported media type. I already set the Body to raw, (text/xml).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found