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 indexing and storage. The submit service is implemented in the RSNA MIRC site software in one of the Java servlets that make up the storage service webapp.
2 The Document Exchange Interfaces
The submit service accepts 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.
2.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 his local computer, select a file for uploading, and submit the file.
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.
2.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.
After parsing the posted file, the submit service returns an HTML page in the response text describing the actions it has taken.
3 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 a 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.
3.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 path names or protocols. Thus, images included in the submission are referenced only by their file names.
3.2 An Example Zip File
The following shows a MIRCdocument submission opened with WinZip. Note the absence of path information for the files.