RAWINPUT (JANUS DEFINE parameter): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:RAWINPUT}}
<span class="pageSubtitle">Keep raw input</span>
<span class="pageSubtitle"><section begin="desc" />Keep raw input<section end="desc" /></span>


<var>RAWINPUT</var> is a parameter on [[JANUS DEFINE]], which defines and sets characteristics of a Janus port. See the [[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]].
<var>RAWINPUT</var> is a parameter on <var>[[JANUS DEFINE]]</var>, 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 <code>content-type</code> header. This has two basic advantages:
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 ''[[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.  
<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 ''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 <var>RAWINPUT</var>, if a client sent, say, XML data, but it did not set the content-type, ''Janus Web Server'' would assume that the content was <code>application/x-www-form-urlencoded</code> (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.  
<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, ''Janus Web Server'' proceeds as follows:
With the <var>RAWINPUT</var> parameter set, however, <var class="product">Janus Web Server</var> proceeds as follows:


<ul>
<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, ''[[Janus Web Server]]'' determines if the input has the <code>application/x-www-form-urlencoded</code> format.  
<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 ''Janus Web Server'' application can still access the data.
<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>
</ul>
</ol>
</ol>
Line 22: Line 21:
This parameter is available in Version 6.7 and later of ''[[Sirius Mods]]''.  
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==
==See also==

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:

  1. 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.
  2. 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 toapplication/x-www-form-urlencoded, or if it is not set at all, Janus Web Server determines if the input has the application/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.

See also