Forrest
Forrest

Reputation: 127913

How to set up cocoahttpserver with configure MIME type

This question need a lot background on apple's air play profile configure.

Firstly, I set up the web server in the iOS app with cocoahttpserver, and want to provide the access to .mobileconfig, but this need set up the MIME type as application/x-apple-aspen-config. For PHP setup, here is the answer

But I am setting up the web server in the iOS app with cocoahttpserver, and I am not familiar with such configuration. So question here to seek professional suggest for this.

Upvotes: 4

Views: 1244

Answers (1)

Victor Ronin
Victor Ronin

Reputation: 23298

The best way is to inherit one of HTTPResponse classes and ovverride httpHeaders method.

Take a look at this question to see how it's done: Change Download File Name in Cocoahttpserver

The only different with that question that you have to setup "Content-Type" header instead of "Content-Disposition"

Upvotes: 1

Related Questions