Top "Content-type" questions

The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET.

How can I find out a file's MIME type (Content-Type)?

Is there a way to find out the MIME type (or is it called "Content-Type"?) of a file in a …

linux bash content-type mime mime-types
Check file uploaded is in csv format

I am uploading a file in php and only want to upload it if it's a csv file. I believe …

php syntax file-upload content-type
Interface/enum listing standard mime-type constants

I am looking among the standard libraries (like apache commons, jax, jboss, javax) for an interface or enum that lists …

java gwt mime-types content-type guava
Spring MVC 4: "application/json" Content Type is not being set correctly

I have a controller mapped with the following annotation: @RequestMapping(value = "/json", method = RequestMethod.GET, produces = "application/json") @ResponseBody public …

java json spring spring-mvc content-type
Utility of HTTP header "Content-Type: application/force-download" for mobile?

I am currently working on a PHP script that allows you to download media contents (video, audio, pictures...) from your …

php http mobile download content-type
Http Post with request content type form not working in Spring MVC 3

code snippet: @RequestMapping(method = RequestMethod.POST)//, headers = "content-type=application/x-www-form-urlencoded") public ModelAndView create(@RequestBody UserAccountBean account) { try{ accounts.put(account.…

spring-mvc content-type
header("Content-type: text/css"); is working in Firefox and Chrome, but in Internet Explorer 9 it shows up as 'text/html'

header("Content-type: text/css"); works in Firefox, Chrome and other, but not in Internet Explorer 9. I am not sure what's …

php http-headers content-type internet-explorer-9
Force nginx to send specific Content-Type

How to overwrite default Content-Type in nginx? Currently when I request 01.dae file, there's Content-Type: application/octet-stream; And I want …

nginx http-headers content-type
Setting request header content-type to json in Spring Framework resttemplate

I'm learning Spring Framework to create a client of a REST web service that uses basic authentication and exchanges JSON. …

spring rest content-type resttemplate
How to get the content-type of a file in PHP?

I'm using PHP to send an email with an attachment. The attachment could be any of several different file types (…

php email content-type file-get-contents