RAWINPUT (JANUS DEFINE parameter): Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:RAWINPUT}} <span class="pageSubtitle"><section begin="desc" /><section end="desc" /></span> RAWINPUT is a parameter on JANUS DEFINE, which defines and sets ch...") |
(Automatically generated page update) |
||
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<span class="pageSubtitle">Keep raw input</span> | |||
<span class="pageSubtitle"> | |||
RAWINPUT is a parameter on [[JANUS DEFINE]], which defines and sets characteristics of a Janus port | <var>RAWINPUT</var> is a parameter on <var>[[JANUS DEFINE]]</var>, which defines and sets characteristics of a Janus port. | ||
This parameter tells <var class="product">[[Janus Web Server]]</var> to save the raw input stream for an HTTP POST, regardless of the mime type set by the client in the <code>content-type</code> header. This has two basic advantages: | |||
<ol> | <ol> | ||
<li>The raw input content for an HTTP POST is always available to <var class="product">Janus Web Server</var> applications (via <var>[[$Web_Input_Content]]</var>) regardless of the content-type. This could be useful for debugging, or perhaps for logging, input content. | |||
<li>It is possible for <var class="product">Janus Web Server</var> to interact correctly with clients that don't set the mime type, regardless of what content they send. Prior to the availability of <var>RAWINPUT</var>, if a client sent, say, XML data, but it did not set the content-type, <var class="product">Janus Web Server</var> would assume that the content was <code>application/x-www-form-urlencoded</code> (form POST) encoded. If after it read some of the content, <var class="product">Janus Web Server</var> discovered that it was not HTML form data, it was too late: the request had to be rejected for having an invalid format. | |||
With the <var>RAWINPUT</var> parameter set, however, <var class="product">Janus Web Server</var> proceeds as follows: | |||
< | |||
<ul> | |||
<li>It loads the input content into CCATEMP. | <li>It loads the input content into CCATEMP. | ||
<li>If the mime type is set to<code>application/x-www-form-urlencoded</code>, or if it is not set at all, | <li>If the mime type is set to<code>application/x-www-form-urlencoded</code>, or if it is not set at all, <var class="product">Janus Web Server</var> determines if the input has the <code>application/x-www-form-urlencoded</code> format. | ||
<li>If the format is '''not''' <code>application/x-www-form-urlencoded</code>, the request is '''not''' rejected, and the | <li>If the format is '''not''' <code>application/x-www-form-urlencoded</code>, the request is '''not''' rejected, and the <var class="product">Janus Web Server</var> application can still access the data. | ||
</ | </ul> | ||
</ol> | </ol> | ||
This parameter is | This parameter is available in Version 6.7 and later of ''[[Sirius Mods]]''. | ||
Valid only for WEBSERV ports. | Valid only for <var>[[JANUS DEFINE#type|WEBSERV]]</var> ports. | ||
== | ==See also== | ||
<ul> | |||
<li>[[List of Janus commands]] | |||
<li>[[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]] | |||
</ul> | |||
[[Category:JANUS DEFINE parameters|RAWINPUT]] | [[Category:JANUS DEFINE parameters|RAWINPUT]] |
Latest revision as of 22:23, 16 April 2013
Keep raw input
RAWINPUT is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port.
This parameter tells Janus Web Server to save the raw input stream for an HTTP POST, regardless of the mime type set by the client in the content-type
header. This has two basic advantages:
- The raw input content for an HTTP POST is always available to Janus Web Server applications (via $Web_Input_Content) regardless of the content-type. This could be useful for debugging, or perhaps for logging, input content.
- It is possible for Janus Web Server to interact correctly with clients that don't set the mime type, regardless of what content they send. Prior to the availability of RAWINPUT, if a client sent, say, XML data, but it did not set the content-type, Janus Web Server would assume that the content was
application/x-www-form-urlencoded
(form POST) encoded. If after it read some of the content, Janus Web Server discovered that it was not HTML form data, it was too late: the request had to be rejected for having an invalid format. With the RAWINPUT parameter set, however, Janus Web Server proceeds as follows:- It loads the input content into CCATEMP.
- If the mime type is set to
application/x-www-form-urlencoded
, or if it is not set at all, Janus Web Server determines if the input has theapplication/x-www-form-urlencoded
format. - If the format is not
application/x-www-form-urlencoded
, the request is not rejected, and the Janus Web Server application can still access the data.
This parameter is available in Version 6.7 and later of Sirius Mods.
Valid only for WEBSERV ports.