From m204wiki
Jump to navigation Jump to search

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