0

We have an embedded product that download its firmware upgrade via HTTP using a program called nvtools. This works from a linux server using Apache. But we switched to a Windows server using IIS. Now we are getting a: "406 - Client browser does not accept the MIME type of the requested page."

when trying to download the firmware update using nvtools. I can't change anything on the embedded system side to make this work. Our IT guy has not been able to fix this yet. What setting in IIS does he need to change to fix this issue?

Dennis

  • One more thing, The file will download ok from a browser, or using wget on the embedded device. The issue is only with the firmware update program nvtools. – Dennis Kerrisk Jun 30 '16 at 14:12

2 Answers2

1

Add .img to the MIME types list as application/octet-stream

longneck
  • 23,082
  • 4
  • 52
  • 86
0

Most of the time when people have problems with MIME types, is because IIS is not configured to serve a file with a certain MIME type, the http status code for that is 404.3, Your 406 means the client has sends an http accept header which is not understood by the server. A typical accept header would be:

Accept: text/html,application/xhtml+xml,application/xml

nvtools sends an accept header with a MIME type that the server does not know about, this explains why using a browser for the same request works fine. The browsers send a valid Accept header.

The accept header tells the server, that for this request the client accepts data in one or multiple MIME types.

You should sniff the network traffic to find out what Accept header is used by nvtools, adding the MIME type used to the MIME type mapping in IIS does not help because those are for serving MIME types, not for Accept ones.

You have two options:

  1. Fix whatever the MIME type in the Accept header of nvtools is.

  2. This solution is an assumption of mine, I have not tested it. Add that MIME type used by nvtools to Windows (not IIS) this is done by adding multiple entries under HKEY_CLASSES_ROOT in the registry, but right now I don't remember the details. There is no way to configure Accept MIME types in IIS so I assume adding it to Windows will be picked up by IIS as well.

Peter Hahndorf
  • 14,058
  • 3
  • 41
  • 58