content-type

.Net Web Service content-type

I need to create a .Net web service (WCF is out of the question) that should receive xml and return xml. I initially setup the function like so: [WebMethod] public string myFunc(string xmlRequest) { How can I change the HTTP POST content-type to text/xml? Also, I'm returning the xml response as a string, but in the web service help pa...

How does symfony choose the very content type?

txt: text/plain js: [application/javascript, application/x-javascript, text/javascript] css: text/css json: [application/json, application/x-json] xml: [text/xml, application/xml, application/x-xml] rdf: application/rdf+xml atom: application/atom+xml It is used by the framework to automatically manage the Conte...

How to know Sharepoint fields controls?

Hi, I am trying to develop a windows application using C# and SharePoint built in web services, that add\update files to SharePoint document libraries. Now i am creating a form that fill the item fields. Is there a way to know each field type and his specific control? ex: single text field is text box, Choice field is a combobox...and...

ASP.NET 3.5 Ajax JSON Serialization...

I have a website that works perfectly under built-for specification but with the increased use of SIM card dongles I’ve (I won’t be the first to be pulling his hair out over this) encountered a site-killing issue... (ok ok ok... a days’ work perhaps) When the mobile provider gets a request for a file it's passed through a very clever ap...

modeling extra table information with django's contenttypes

I've just started using Django's contenttypes framework (and it's pretty awesome). I have an Area object that has many specialised Block objects - I've modeled it as below. class Area(models.Model): ... class SomeBlock(models.Model): ... class AreaBlock(models.Model): area = models.ForeignKey(Area) content_type = model...

Cannot associate a custom SharePoint Workflow with a Content Type in SharePoint Server 2010

To preface, I am working with SharePoint Server 2010 Beta 2, Visual Studio 2010 Ultimate RC. I have built a custom Content Type based on the Item type with a few custom site columns. I also have built a custom Sequential Workflow using Visual Studio 2010. This is a relatively simple workflow that creates a task, waits for the task to ...

For HTTP responses with Content-Types suggesting character data, which charset should be assumed by the client if none is specified?

If no charset parameter is specified in the Content-Type header, RFC2616 section 3.7.1 seems to imply ISO8859-1 should be assumed for media types of subtype "text": When no explicit charset parameter is provided by the sender, media subtypes of the "text" type are defined to have a default charset value of "ISO-8859-1" when r...

Returning HTML in the JS portion of a respond_to block throws errors in IE

Here's a common pattern in my controller actions: respond_to do |format| format.html {} format.js { render :layout => false } end I.e., if the request is non-AJAX, I'll send the HTML content in a layout on a brand new page. If the request is AJAX, I'll send down the same content, but without a layout (so that it can be inser...

How to find out an extension's content type?

Where could I find out the content type for a specific file format/extension? For example, I know that an mp3 can be one of the following content types: 'application/mp3', 'application/x-mp3', 'audio/mpeg', 'audio/mp3' What would be the content type for a zip file? Where would I find out that information for other content types? I ne...

List of available “application/…” media types

Anyone know the list of available application/… media types? It is because my website will be having different types of downable documents such as doc, docx, txt, pdf etc. I need to know the available application/… for the HTTP header. ...

IE and Content-disposition inline vs. extension-token [unanswered]

This question, despite accepted-answer, was not answered. The reason it has an answer marked as accepted is because the bounty system, which I used, demands one. You are still welcome to answer this question if you know the answer (please do) - I will try to reputation-pay you in upvotes elsewhere. (Reputation purists may now throw rocks...

Unable to remove System Page fields from my content type with <RemoveFieldRef/>

Hi guys, I'm creating some content types in a feature for a publishing site in SP2010 RC using VS2010, and I am unable to remove the out-of-the-box Contact fields included in the Page content type with RemoveFieldRef. My definition looks like: <ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39...

Using a Non-Default Manager with GenericForeignKey()

I have altered the default manager on some of the objects which a GenericForeignKey() can reference such that those objects may no longer appear within that default manager. I have other managers which will be able to find these deleted objects, but I see no way to tell the content types framework about them. Is this possible? I am imp...

OpenCMS Content Type - when editing, it doesn't show the names of the fields

Hi! I created a custom content type FaqEntry in OpenCMS (three fields - title, question, answer) and registered it. When I create a new file of that type and want to edit it, it shows the three fields there, but it doesn't show their label, i.e. "Title", "Question", "Answer". Do you have any idea as to why? ...

WAMP not sending file headers (content-type) correctly

Hi! I cant get a PHP file to send correct headers at my WAMP server. Wouldn't be a problem normally except that is phpMyAdmin that is freaking out and that the main css files are not working in Firefox. Here's the row that in the file that merges the css files together, used to send the output as CSS. header('Content-Type: text/css; c...

How to force browser to set charset in content-type http header

A simple HTML file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <form method="POST" action="test.jsp" accept-charset="utf-8" method="post" enctype="application/x-www-form-urlencoded" > <input type="text" name="P"/> ...

Is it possible to pass a querystring when creating a new document in a sharepoint list?

I would like to pass a querystring to Infopath when creating a new document (based off of a content type that I created and published with infopath). Like so: http://server.com/Forms/Form1.xsn?String=value I know that Infopath can handle querystrings but I'm unclear on the process behind creating a new list item from content type. Is th...

Javascript image load: get error status

Hi, I am loading a image trough javascript: myimage.src = "/mycontroller/mymethod"; myimage.alt = "image"; myimage.onload = function(){ $('body').append(myimage); }; But, somethimes my controller method should return an error, with the http status 500. So, the content-type will not be "image/png" anymore. Will be text. There's...

When do browsers send application/octet-stream as Content-Type?

Hi! I'm developing a file upload with JSF. The application saves three dates about the file: Filename Bytes Content-Type as submitted by the browser. My problem is that some files are saved with content type = application/octet-stream even if they are *.doc files oder *.pdf. When does the browser submits such a content type? I woul...

How can I use multiple PHP header content types on the same page? is this possible?

Is it possible to use multiple header types in one document? For example: header("Content-type: image/jpeg"); header('Content-Type: text/html; charset=utf-8'); returns the whole page as text/html... while header('Content-Type: text/html; charset=utf-8'); header("Content-type: image/jpeg"); Returns the whole page as an image.... Ho...