1. Content Type Octet Stream Csv
  2. Content Type Stream Json
  3. Content Type Octet Stream

4 The Content-Type Header FieldThe purpose of the Content-Type field is to describe the data contained in the body fully enough that the receiving user agent can pick an appropriate agent or mechanism to present the data to the user, or otherwise deal with the data in an appropriate manner. (See ) The Content-Type header field is used to specify the nature of the data in the body of an entity, by giving type and subtype identifiers, and by providing auxiliary information that may be required for certain types.

After the type and subtype names, the remainder of the header field is simply a set of parameters, specified in an attribute/value notation. The set of meaningful parameters differs for the different types. The ordering of parameters is not significant. Among the defined parameters is a 'charset' parameter by which the character set used in the body may be declared.

' Set the page's content type to JPEG files ' and clears all content output from the buffer stream. Response.ContentType = 'image/jpeg' Response.Clear() ' Buffer response so that page is sent ' after processing is complete. Oct 20, 2018 - The ultimate javascript content-type utility. Simply returns false, so do var type = mime.lookup('unrecognized') 'application/octet-stream'.

Comments are allowed in accordance with rules for structured header fields. In general, the top-level Content-Type is used to declare the general type of data, while the subtype specifies a specific format for that type of data. Thus, a Content-Type of 'image/xyz' is enough to tell a user agent that the data is an image, even if the user agent has no knowledge of the specific image format 'xyz'.

Such information can be used, for example, to decide whether or not to show a user the raw data from an unrecognized subtype - such an action might be reasonable for unrecognized subtypes of text, but not for unrecognized subtypes of image or audio. For this reason, registered subtypes of audio, image, text, and video, should not contain embedded information that is really of a different type. Such compound types should be represented using the 'multipart' or 'application' types. Parameters are modifiers of the content-subtype, and do not fundamentally affect the requirements of the host system. Although most parameters make sense only with certain content-types, others are 'global' in the sense that they might apply to any subtype. For example, the 'boundary' parameter makes sense only for the 'multipart' content-type, but the 'charset' parameter might make sense with several content-types.

An initial set of seven Content-Types is defined by this document. This set of top-level names is intended to be substantially complete. It is expected that additions to the larger set of supported types can generally be accomplished by the creation of new subtypes of these initial types. In the future, more top-level types may be defined only by an extension to this standard. If another primary type is to be used for any reason, it must be given a name starting with 'X-' to indicate its non-standard status and to avoid a potential conflict with a future official name. In the of, a Content-Type header field value is defined as follows: Content-Type:= type '/' subtype.' ;' parameter type:= 'application' / 'audio' / 'image' / 'message' / 'multipart' / 'text' / 'video' / x-token x-token:= subtype:= token parameter:= attribute '=' value attribute:= token value:= token / quoted-string token:= 1.

tspecials:= '(' / ')' / ' / '@'; Must be in / ',' / ';' / ':' / ' ' /; quoted-string, / '/' / ' / ' / '?' ; to use within / '='; parameter values Note that the definition of 'tspecials' is the same as the RFC 822 definition of 'specials' with the addition of the three characters '/', '?'

Note also that a subtype specification is MANDATORY. There are no default subtypes.

The type, subtype, and parameter names are not case sensitive. For example, TEXT, Text, and TeXt are all equivalent. Parameter values are normally case sensitive, but certain parameters are interpreted to be case- insensitive, depending on the intended use. (For example, multipart boundaries are case-sensitive, but the 'access- type' for message/External-body is not case-sensitive.) Beyond this syntax, the only constraint on the definition of subtype names is the desire that their uses must not conflict.

That is, it would be undesirable to have two different communities using 'Content-Type: application/foobar' to mean two different things. The process of defining new content-subtypes, then, is not intended to be a mechanism for imposing restrictions, but simply a mechanism for publicizing the usages. There are, therefore, two acceptable mechanisms for defining new Content-Type subtypes:. Private values (starting with 'X-') may be defined bilaterally between two cooperating agents without outside registration or standardization. New standard values must be documented, registered with, and approved by IANA, as described in Appendix F. Where intended for public use, the formats they refer to must also be defined by a published specification, and possibly offered for standardization.

The seven standard initial predefined Content-Types are detailed in the bulk of this document. They are: text textual information. The primary subtype, 'plain', indicates plain (unformatted) text. No special software is required to get the full meaning of the text, aside from support for the indicated character set. Subtypes are to be used for enriched text in forms where application software may enhance the appearance of the text, but such software must not be required in order to get the general idea of the content. Possible subtypes thus include any readable word processor format. A very simple and portable subtype, richtext, is defined in this document.

Multipart data consisting of multiple parts of independent data types. Four initial subtypes are defined, including the primary 'mixed' subtype, 'alternative' for representing the same data in multiple formats, 'parallel' for parts intended to be viewed simultaneously, and 'digest' for multipart entities in which each part is of type 'message'. Message an encapsulated message. Dora' s pirate adventure kiss cartoon characters.

A body of Content-Type 'message' is itself a fully formatted RFC 822 conformant message which may contain its own different Content-Type header field. The primary subtype is 'rfc822'. The 'partial' subtype is defined for partial messages, to permit the fragmented transmission of bodies that are thought to be too large to be passed through mail transport facilities. Another subtype, 'External-body', is defined for specifying large bodies by reference to an external data source. Image image data.

Image requires a display device (such as a graphical display, a printer, or a FAX machine) to view the information. Initial subtypes are defined for two widely-used image formats, jpeg and gif. Audio audio data, with initial subtype 'basic'. Audio requires an audio output device (such as a speaker or a telephone) to 'display' the contents.

Video video data. Video requires the capability to display moving images, typically including specialized hardware and software. The initial subtype is 'mpeg'. Application some other kind of data, typically either uninterpreted binary data or information to be processed by a mail-based application.

Content Type StreamContent Type Stream

The primary subtype, 'octet-stream', is to be used in the case of uninterpreted binary data, in which case the simplest recommended action is to offer to write the information into a file for the user. Two additional subtypes, 'ODA' and 'PostScript', are defined for transporting ODA and PostScript documents in bodies. Other expected uses for 'application' include spreadsheets, data for mail-based scheduling systems, and languages for 'active' (computational) email.

Content Type Octet Stream Csv

(Note that active email entails several securityconsiderations, which are discussed later in this memo, particularly in the context of application/PostScript.) Default RFC 822 messages are typed by this protocol as plain text in the US-ASCII character set, which can be explicitly specified as 'Content-type: text/plain; charset=us-ascii'. If no Content-Type is specified, either by error or by an older user agent, this default is assumed. In the presence of a MIME-Version header field, a receiving User Agent can also assume that plain US-ASCII text was the sender's intent. In the absence of a MIME-Version specification, plain US-ASCII text must still be assumed, but the sender's intent might have been otherwise. (See It should be noted that the list of Content-Type values given here may be augmented in time, via the mechanisms described above, and that the set of subtypes is expected to grow substantially. When a mail reader encounters mail with an unknown Content- type value, it should generally treat it as equivalent to 'application/octet-stream', as described later in this document.

The Content-Type entity header is used to indicate the of the resource. In responses, a Content-Type header tells the client what the content type of the returned content actually is.

Content Type Stream Json

Browsers will do MIME sniffing in some cases and will not necessarily follow the value of this header; to prevent this behavior, the header can be set to nosniff. In requests, (such as or ), the client tells the server what type of data is actually sent. Header type no yes Syntax Content-Type: text/html; charset=utf-8 Content-Type: multipart/form-data; boundary=something Directives media-type The of the resource or the data.

Charset The character encoding standard. Boundary For multipart entities the boundary directive is required, which consists of 1 to 70 characters from a set of characters known to be very robust through email gateways, and not ending with white space.

Content Type Octet Stream

It is used to encapsulate the boundaries of the multiple parts of the message. Often, the header boundary is prepended with two dashes and the final boundary has two dashes appended at the end. Examples Content-Type in HTML forms In a request, resulting from an HTML form submission, the Content-Type of the request is specified by the enctype attribute on the element.

   Coments are closed