Technical References - [listmimeheaders]

Lists all the MIME header names and values sent from the remote browser.

numero = 221
interpreted = N
texte = [listmimeheaders params]MIME Header Tags[/listmimeheaders] To display a list of all the MIME headers available, put a [listmimeheaders] context into a template. Example: The following are all the MIME headers available to this page:
[listmimeheaders][index],[name],[value]
[/listmimeheaders]
The [listmimeheaders] context has optional parameters that are placed within the beginning tag in order to modify the list of MIME headers produced. The exact spelling of the MIME headers changes from web server to web server, so you may have to experiment with them. Example:
Your web browser preferences show that your native language is:[listmimeheaders name=HTTP_ACCEPT_LANGUAGE][value][/listmimeheaders]
Example:
The following are the values of all the MIME headers whose name begins with "HTTP_ACCEPT":[listmimeheaders name=HTTP_ACCEPT&exact=F][index],[value][/listmimeheaders]
The following parameters are optional to the [listmimeheaders] context:
ParameterDescription
NameThe name of the MIME header to list.
ExactT(rue) or F(alse) whether to exactly match the name of the parameter or match any name that contains the "name" value. (Default value is true.)
The following tags are available inside a [listmimeheaders] context:
TagDescription
[Name]The name of the MIME header.
[Value]The value associated with the MIME header.
[Index]
A number from 1 to the total number of MIME headers, indicating this header's index position in the list.
Example Imagine you want to extract the domain name from an URL to be able to redirect a request to the same URL but to another domain:
[function name=CALL_DOMAIN][return][listmimeheaders name=host&exact=F][url][value][/url][/listmimeheaders][/return][/function]
and do something like this:
[showif [CALL_DOMAIN]=www.domain1.com][redirect http://www.domain2.com][/showif][showif [CALL_DOMAIN]=www.domain3.com][redirect http://www.domain4.com[thisurl]][/showif]
[listmimeheaders params]MIME Header Tags[/listmimeheaders]

To display a list of all the MIME headers available, put a [listmimeheaders] context into a template.

Example:

The following are all the MIME headers available to this page:

[listmimeheaders]
[index],[name],[value]

[/listmimeheaders]

The [listmimeheaders] context has optional parameters that are placed within the beginning tag in order to modify the list of MIME headers produced. The exact spelling of the MIME headers changes from web server to web server, so you may have to experiment with them.

Example:

Your web browser preferences show that your native language is:
[listmimeheaders name=HTTP_ACCEPT_LANGUAGE]
[value]
[/listmimeheaders]

Example:

The following are the values of all the MIME headers whose name begins with "HTTP_ACCEPT":
[listmimeheaders name=HTTP_ACCEPT&exact=F]
[index],[value]
[/listmimeheaders]

The following parameters are optional to the [listmimeheaders] context:
ParameterDescription
NameThe name of the MIME header to list.
ExactT(rue) or F(alse) whether to exactly match the name of the parameter or match any name that contains the "name" value. (Default value is true.)

The following tags are available inside a [listmimeheaders]">[listmimeheaders] context:
TagDescription
[Name]The name of the MIME header.
[Value]The value associated with the MIME header.
[Index]
A number from 1 to the total number of MIME headers, indicating this header's index position in the list.


Example
Imagine you want to extract the domain name from an URL to be able to redirect a request to the same URL but to another domain:

[function name=CALL_DOMAIN][return][listmimeheaders name=host&exact=F][url][value][/url][/listmimeheaders][/return][/function]


and do something like this:

[showif [CALL_DOMAIN]=www.domain1.com][redirect http://www.domain2.com][/showif]
[showif [CALL_DOMAIN]=www.domain3.com][redirect http://www.domain4.com[thisurl]][/showif]

DOWNLOAD WEBDNA NOW!

Top Articles:

WebDNA Libraries

A list of available libraries for WebDNA...

Download WebDNA Applications

WebDNA applications...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

WebDNA Modules

A list of the currently available modules...

WebDNA reference

...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

Related Readings:

[date]

Putting [date] in your template displays the current date as defined by the clock on your web server...

[include]

Include the contents of the specified file...

Web Hosting Control Panels and WebDNA

Web Hosting Control Panels are becoming prevelant in the industry...

order file

File Formats - Order File/Shopping Cart in WebDNA...

[SQL]

Performs a SQL statement on an ODBC data source...

[thisurl]

[thisurl] displays the URL of the current page...