Tag Info

Hot answers tagged

30

The files are actually ZIPs of XML documents. Add this to your .htaccess in Apache AddType application/vnd.ms-word.document.macroEnabled.12 docm AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx AddType ...


14

You can use 0 string PK\x03\x04\x14\x00\x06\x00 Microsoft Office Open XML Format in /etc/magic to identify the general file type based on the information you supplied. (However, this might not be universal: PK\x03\x04\x00\x14\x08\x08 has been observed at the start of LibreOffice-generated XLSX files.) Later versions of Ubuntu have a go at ...


11

The server doesn't have proper mime types set up for the new ms file types add the following to the /etc/mime.types file and restart apache and the problem should be fixed. # Added by myname 2009-06-03 application/vnd.ms-word.document.macroEnabled.12 docm application/vnd.openxmlformats-officedocument.wordprocessingml.document docx ...


10

The mime types are probably wrong. Check they're serving the content with Content-type: text/javascript or Content-type: text/css. You can check this using the Network tab of Chrome's Inspector or Firebug. You'll need mod_mime, and ensure you have these lines in your httpd.conf: AddType text/css .css AddType text/javascript .js That should do it.


6

It's not possible. There is a long standing feature request for broadcasting configs to client. It's not presently due until 2.0, or later. The closest you can come is to use hooks. Either with a pre-commit to prevent incorrectly configured clients from submitting the wrong data. Or a post-commit to retro-fix wrong data. Neither is great and I believe the ...


6

If you want to let nginx guess the right mime type, you juste have to make sure no content-type is returned from your backend server. With django: response = HttpResponse() response['Content-Type'] = '' response['X-Accel-Redirect'] ='/my/file.jpg' return response


5

The perl-MIME-tools package includes a variety of command-line tools for processing MIME-encoded messages, including mimeexplode: Takes one or more files from the command line that contain MIME messages, and explodes their contents out into subdirectories of the current working directory. The subdirectories are just called "msg0", "msg1", "msg2", etc. ...


4

file, version prior to 5.13, will truncate MIME type to 64 characters. So using the content of msooxml, the MIME type from file -bi command becomes "mime application/vnd.openxmlformats-officedocument.wordprocessingml.d; charset=binary"


4

There must be an empty line between the message or MIME headers and the message content: ------=_NextPart_b45f3c386576f1955bb5338634f5047f_alt Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Return ID: 1 Return Date: 11/09/2011 Here you'll need an empty line between Content-Transfer-Encoding: 8bit and Return ID: 1. If Return ID ...


4

You can use AddType to force a MIME type, or you can update your magic file.


4

You can add an universal MIME type by using the extension "*" and the type "application/octet-stream": http://support.microsoft.com/kb/326965


3

While there is no great answer to this, you can use svn_apply_autoprops.py which I wrote to apply your standard auto-props to a working copy to bring all the files there into compliance.


3

Apache Subversion 1.8 introduced the Repository Dictated Configuration feature which requires SVN 1.8 client. (1.8 server is not required, in other words). With Subversion 1.8, you can configure auto-props patterns within a repository using the new Subversion svn:auto-props inherited property. For example, setting svn:auto-props value to *.bmp = ...


3

Try this directive on your site configuration: DefaultType application/octet-stream Or this one: DefaultType None The default seems to be text/plain: DefaultType Directive Description: MIME content-type that will be sent if the server cannot determine a type in any other way Syntax: DefaultType MIME-type|none Default: DefaultType text/plain ...


3

You can get an authoritative list for your machine by looking at applicationHost.config at %windir%\system32\inetsrv\config\applicationHost.config. Search for mimeMap and it will jump to the first one. The default .zip mime type is 'application/x-zip-compressed'. You can edit with IIS Manager at the server level (MIME Types icon) or you can edit ...


3

I haven't tested this, so take it with a grain of salt, but this should do it; RewriteEngine on RewriteRule ^.*\.js$ - [env=headerjs:1] Header set Content-type application/javascript env=headerjs This is pretty hackish.. if possible, reconsider doing it in the PHP code.


3

The Content-ID does not indicate that a image should be displayed inline. This header is needed to reference the embedded data within HTML. As an email is a text-message there is no reason to display an image embedded, as long as the mail is plain-text. Some clients does display the data inline regardless of the format is HTML or plain-text. But this is ...


3

I think you're looking for the Content-Disposition header field, which allows you define the presentation style of a body part (such as an image) to be inline or attachment. Here's an inline example created by Thunderbird: --------------040202010204080305090405 Content-Type: image/png; name="test.png" Content-Transfer-Encoding: base64 Content-ID: ...


3

Modify the mime.types file by adding the following: text/css css Below are the contents of the mime.types file I use on one of my Apache servers. I am fairly certain that it covers pretty much all types of files that your (or any) server may serve up to users. I would suggest making the change to your VPS's mime.types file to include everything ...


3

The most comprehensive, modern, and compatible configuration is found in the h5bp GitHub repository. application/x-javascript is old and not needed for Internet Explorer support. I won't paste the configurations here, because some people might copy/paste them. Instead I directly link to the master files within the h5bp repository. This ensures that people ...


3

The problem here is that you used an online utility to "convert" from Apache to nginx, and none of these do very well. if (!-e $request_filename){ rewrite ^(.*)$ /index.php?/$0 break; } This needs to be cut entirely, and replaced with try_files. try_files $uri $uri/ /index.php?$uri; You have also misplaced your root directive. It should be under ...


2

You can use the following fragment in a shell script. This is admittedly a very ugly hack, so do use this only for uncritical things. I think it is possible that it adds a byte or two at the end of the file, but otherwise it seems to work fine. mail ${mailinglist} << END_MAIL To: ${mailinglist} From: ${mailsender} Subject: ${subject} Content-Type: ...


2

I finally discovered the problem. The Traq installation view file, install/views/layout.php included a doctype at the top of this file: <!doctype html> <html lang="en" dir="ltr"> <head> <title>Traq Installation<?php echo isset($title) ? " / {$title}" :''; ?></title> <style type='text/css'> ...


2

You want to enable MultiViews content negotiation, which makes Apache select an appropriate representation of a resource. The following directive in .htaccess or an appropriate <Directory>, <Location> or <Files> section should do that. Options MultiViews


2

You can use arguments in statements like $log1 = $ARGV[0] and $log2 = $ARGV[1] and assign them in your $msg->attach section. You can use it like this: while (@ARGV) { $msg->attach( 'Type' => 'text/plain', 'Path' => shift @ARGV ); }


2

is it possible to know which MIME type is used when a file is downloaded This should be the value of the Content-Type HTTP Header. It should be possible to modify your Apache LogFormat line to include the value of the Content-Type Header. %{Content-Type}o. If you are not serving content over HTTPS, then you could install and use wireshark. This ...


2

Sounds like your web server is looking at the magic numbers inside these files and seeing that they ARE zip files. Have a look at: http://www.webdeveloper.com/forum/showthread.php?t=162526


2

You don't mention how the messages are being retrieved, but I have seen this before with Exchange 2007 and IMAP retrieval (though I believe it affects POP3 as well). Have a look at this Technet document, specifically the ImapMessagesRetrievalMimeFormat switch. The documentation is exceedingly vague, but Exchange can force the format of the messages as they ...


2

That only happens in the windows world in the unix world files do not have to have an extension they are identified by mime type.



Only top voted, non community-wiki answers of a minimum length are eligible