content-type

Custom action not binding to custom content type

I have created a custom content type and want to add a custom action to it but it is not working. I have tried editing the registrationid to the standard item content type id (0x01) and is works but not with my content type. Is it possible to add custom actions to custom content types??? ...

Serving XHTML as application/xhtml+xml with Ruby on Rails

I'm trying to get my Rails app to serve XHTML content properly, with the correct content-type of application/xhtml+xml. Ideally with content negotiation so that IE users get a chance to use the site too. Given that all the HTML generated by Rails is marked at XHTML 1.0 Transitional, I'm a bit surprised that there is no obvious option to...

How do you set the content type for a WebMatrix/Razor Response?

I'd like to return some XML instead of HTML in my WebMatrix cshtml file? How do you change the content type header? ...

Django built-in signals problem: error when using post_save

Hello! I'm building an app that notifies user when new ThreadedComments appear. For this I'm using post_save signal. Here's my models.py: from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from datetime impor...

C# Create MIME Header Information? (Content-Type etc.)

I am reading in a file and want to add MIME header infromation to the top of the file. For example: I have a text file called test.txt. I read the file into a byte array then want to append the following to the beggining: Content-Type: text/plain; name="test.txt" Content-Transfer-Encoding: binary Content-Disposition: attachment; ...

Does the content type header in RabbitMQ have any special meaning?

Does the content type header in RabbitMQ have any special meaning, or is it only a standardized way for my producers and consumers to signal what kind of data they are sending? In other words: will messages with certain content types get any special treatment, or is it just bytes, either way? ...

HTML5 Cache Manifest and Content types

i am reading Dive into HTML5: Offline web apps: Cache manifest ... but it must be served with the content type text/cache-manifest. If you are running an Apache-based web server, you can probably just put an AddType directive in the .htaccess file at the root of your web directory AddType text/cache-manifest .manifes...

MOSS 2007: custom redirect page sps404.html does not return HTTP header content-type

With most browsers this is not a problem, but with a combination of ISP proxies and Safari browsers on iPhone/iPad the page is rendered as text/plain, so the JavaScript on the page won't run. Can I set the HTTP header for this specific page manually somehow or Is there a workaround on MOSS/IIS? I could put rules onto our load bal...

How to create custom forms for custom content type in wordpress?

Hi.. Is there any way to create forms for a particular content type and submit it form the site itself. I have 2 content types created in my Wordpress and I want to create a form to post to a particular content type. Also is it possible to create the form as a page in wordpress? regards - dj ...

How to customize TDO miniforms in wordpress

Is there any way to post TDO miniform content to different post types. Currently its allowing only to post to categories. Is there any hack to post to content types using TDO mini form. Also I can't see the contents posted through TDO Mini form in the site. I can see the fields and content while editing the post but in the site, only the...

How to write content type in cakephp ?

Hi, How can i write ["Content-Type"] = "text/xml" in cakephp and in which file i have to include that one. Please Help. Thanks. ...

how do i connect to web service via wcf client? getting a "does not match content type" ProtocolException

I basically follow the instructions in MSDN: http://msdn.microsoft.com/en-us/library/ms730299(VS.85).aspx But when I try to invoke the web service, I get the error" {"The content type text/xml of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure...

Multipart email coming through as mixed rather than alternative

We use a third party system for sending bulk emailings. A strange thing occurred recently. We send multipart emails and they normally show up in our company's inboxes as HTML but within the past month one specific mailing started showing up in our inboxes as text with an HTML attachment. I noticed that the header previously had a cont...

Help with Content Type Display

I am new to Drupal and I am trying to figure out how to theme a Content Type. I am building a Realtor site for a client whereby my main content type will be something like 'Property Listing'. I have installed all the necessary modules to help me upload images and everything works properly. I need to be able to display BOTH the Fullsize a...

Adding ContentTypes to a list with SiteDefinition

Using SharePoint 2010 and Visual Studio I have created a site definition (inheriting from the publishing site) which correctly creates all the required lists and now includes page instances in the "Pages" document library. The Pages use the correct custom pagelayout and the correct content type, however, because the "pages" library on...

iPhone : upload image to web aspx file

Hey ! I have a little problem. I have to upload a photo from my iPhone to a web server with POST Method but the server file is in aspx. I tried my code with my server and PHP file : works well ! Now with aspx file : doesn't upload :( I don't havec access to the .aspx . Here is my iphone code : NSData *imageData = UIImageJPEGRepresent...

How to preserve the Content-Type header of a Tomcat HTTP response sent through an AJP connector to Apache using mod_proxy

I'm having a problem with an incorrect HTTP Response Content-Type header while accessing an Axis2 web service hosted in Tomcat behind Apache through an AJP/1.3 connector. I can access the web service without problems in the browser through its RESTful interface and I can see the results but somehow Apache is changing the response Conten...

Is it OK to tag the same document using different Content-Types based on Accept headers?

Let's say I've designed a media type which is a strict subset of another media type. For example, my media type is application/vnd.example.foo+xml (hereafter abbreviated foo+xml). This media type is a strict subset of the application/xhtml+xml (hereafter abbreviated xhtml) media type. Basically my media type definition adds additional...

Response.ContentType = "text/csv" causes XML error

Hi, I've got an odd issue. I'm creating a DataTable type my application then converting it to a CSV so the user can download the data. I set the content type like this: context.Response.Clear(); context.Response.ContentType = "text/csv"; context.Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName ...

How to get CakePHP to render plain text with line feeds?

I need one of my controller actions to return a list of names, on name per line, as plain text. The reason for this is so that it can be consumed by the JQuery autocomplete plugin which expects this format. Unfortunately, when the page renders, the \n characters won't render as newlines. Controller function UserController extends App...