The MIRC Protocol for Document Exchange
This article describes the protocol used by the RSNA MIRC software to import and export documents. It is used by the Submit Service to accept MIRCdocument submissions for storage and indexing.
1 The Document Exchange Interfaces
The submit service provides two interfaces for documents: one intended for web browsers and one intended for MIRCdocument authoring tools. In both cases, the payload is the same.
1.1 The Browser Interface
When the submit service receives an HTTP GET, it returns an HTML page containing a form allowing the user to browse the client computer, select a file for uploading, and submit it.
When the user clicks the Submit button on the form, the browser sends the file in an HTTP POST with Content-Type multipart/form-data.
When the submit service receives an HTTP POST with Content-Type multipart/form-data, it creates a directory for the submission, receives the data, parses the multipart request, saves the file in the directory, and then parses the file as described in The File Structure of a MIRC Submission.
After parsing the posted file, the submit service returns an HTML page in the response text describing the actions it has taken. The browser then displays the results in its window.
1.2 The Authoring Tool Interface
When the submit service receives an HTTP POST with Content-Type application/x-zip-compressed, it creates a directory for the submission, receives the data, saves the file in the directory, and then parses the file as described in The File Structure of a MIRC Submission.
If the POST includes a path query string, the submit service attempts to update the document found at the relative path specified. The path is relative to the storage service's root directory.
After parsing the posted file, the submit service returns an HTML page in the response text describing the actions it has taken.
2 The File Structure of a MIRC Submission
Whether submitted within a multipart form by a browser or as an HTTP file transfer by an authoring tool, the submitted file is a zip file containing one MIRCdocument as described in The MIRCdocument Schema, plus all the objects that the MIRCdocument references in its own directory.
Because the transmitter has no control over where, or even in what form, the MIRCdocument will be stored on a MIRC site, the zip file is not allowed to provide any directory information for the files it contains. Zip files containing directory information are rejected by the submit service, and the results page describes the action taken.
2.1 Local and Global References
MIRCdocuments may contain references to objects anywhere on the internet. Objects whose locations on the internet are independent of the location of the MIRCdocument are global references, and they are specified in href, src, or docref attributes with fully qualified path names, including the protocol.
Objects that are part of the submission and referenced by the MIRCdocument are local references, and they are specified in href, src, or docref attributes without protocols or path information. Thus, images included in the submission are referenced only by their file names.
2.2 An Example Zip File
The following shows a MIRCdocument submission opened with WinZip. Note the absence of path information for the files.