I am currently using a MOD5282 with default firmware. I am trying to run a web server that can serve SVG files up. I order to do this properly the files need to have MIME type of image/svg+xml (currently the server is marking them as text/plain).
My question is there a way to configure Netburners web server to serve up different MIME types than those provided by default? I see that the source and header files for the comphtml are probably the place to do this, but how do I change, build and program this so it works as I described above?
Thank you for your help.
Web Server MIME Types
Re: Web Server MIME Types
Good news, you can do this without rebuilding any of our tools. Edit the file \nburn\pcbin\MIME_magic.txt. It should be self explanatory. Make your change and then clean and rebuild your project.SandCuser wrote: My question is there a way to configure Netburners web server to serve up different MIME types than those provided by default? I see that the source and header files for the comphtml are probably the place to do this, but how do I change, build and program this so it works as I described above?
Forrest Stanley
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Re: Web Server MIME Types
Man... Can't believe I missed that one. Add the line
to your MIME_magic.txt in pcbin. Amusingly, this is precisely why the MIME_magic file was added last year.
I've added that MIME type to the main copy of the file for future releases.
-Dan
Code: Select all
.svg 1 image/svg+xml
I've added that MIME type to the main copy of the file for future releases.
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc