RAWINPUT (JANUS DEFINE parameter)

From m204wiki
Revision as of 14:39, 14 March 2011 by Alan (talk | contribs)
Jump to navigation Jump to search

<section begin="desc" />Keep raw input<section end="desc" />

RAWINPUT is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port. See the List of JANUS DEFINE parameters.

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:
    1. It loads the input content into CCATEMP.
    2. 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.
    3. 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 only available in Version 6.7 and later of Sirius Mods.

Valid only for WEBSERV ports.

References

See: List of Janus commands | List of JANUS DEFINE parameters.