This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Webpage with Css, js,...

Hi,

We have a Webpage that is running bootstrap(.css).

Offline (PC) the Page works fine but not on the Embedded file system (efs) on our Sitara.

We looked at the HTTP Packages with Wireshark and find out that the head says:

 

Content-type: application/octet-stream

but it should be: Content-type: text/javascript or text/css ...

 

Someone else had the same Problem with an Apache-Server.

He had to make some configurations:

TypesConfig "conf/mime.types"

AddType text/javascript .js

Is there a way to do something like that for the NDK?

Or another way to solve the problem?

 

Thanks in advance.

 

Kind regards,

Raul

 

Code Composer Version: 6.1.0.00104

SYS/BIOS 6.41.00.26

XDCTools 3.30.04.52 core

NDK 2.24.01.18

  • Hi Raul,

    Tobias Raul Borchert said:

    Content-type: application/octet-stream

    but it should be: Content-type: text/javascript or text/css ...

    I am guessing you are using NDK's HTTP server ? The HTTP server in NDK does not recognize ".js" filetype and hence does not have a corresponding content type. It does however recognize ".css" file type so can you return files with ".css" extension ?

    If you need the server code to recognize ".js" files and use the corresponding content type, you can update the SetContentType() function in "ti/ndk/nettools/http/httpsend.c" file to include a check for ".js" and rebuild NDK. Since NDK's HTTP server implements HTTP 1.0, I am not sure if adding ".js" support would have other implications.

    Best,

    Ashish