The user opens a site’s start-URL in his browser. The FIT Server accepts the incoming HTTP request. First of all, the FIT Server builds up the Delivery Context, reads the config.xml and enters the FIT Flow.
The FIT Server acquires the data from the source. Therefore, the source URL must be known. Usually, the source URL is encoded within the FIT URL. The URLs and the site’s start-URL are configured in the urlmap.xml.
The user opens the URL
http://www.example.com/ with is mapped to
The user clicks on a link within the site. The link points to a subpage and looks like this:
http://www.example.com/http%3Asource.example.com/subpage.xml. The full URL of the source is encoded within this FIT URL (
http://source.example.com/subpage.xml). (Use the URL-Map to shorten the URL, so that it looks like
http://www.example.com/subpage.xml, for example).
Once the source URL is known, and if necessary, has been decoded according to the rules of the URL-Map, the acquisition can begin: A local resource (URL starting with
fit://local/) is read directly from the file system, a http-URL is loaded from the remote source server.
If the source is non-local, the request options configured in the source management are considered for the request. This includes settings like header enrichment and HTTP auth (see documentation).
If a connection error occurs, the the error page configured in the site’s settings is loaded and used for further processing. Only resources from sources that are configured in the source management are loaded. If a source is not configured, the configured error page will be loaded instead.
The response body of the source as well as the response’s HTTP status is saved at this point. On connection- or request-timeout, the HTTP status 504 (“Gateway Timeout”) is set. For other connection errors, 502 (“Bad Gateway”) is set. The HTTP status is sent at the end of the FIT-request to the requesting browser. The status can be modified during the processing phase with appropriate instructions within the System Aggregation.
<flow> <default-request /> ... </flow>
The loaded content is parsed in this phase. Therefore, the type of content must be known. The right parser is selected on the basis of the type. The type can usually be recognized automatically, based on the Content-type header included in the source’s response. For example,
text/xml chooses the XML parser,
text/html the HTML parser and text/json the JSON parser.
<flow> <default-request /> <parse /> </flow>
You can manually set the desired parser in the source management, if the source server sends an invalid Content-type header.
If no matching parser is found, processing is terminated at this point and the unmodified content is sent to the browser. This is useful for e.g. images or PDF files.
If any parsing errors occur while processing the content, the error page configured in the site’s settings is loaded and used for further processing. A likely cause for this is invalid XML that the XML parser fails to parse. (Since the XML parser is somewhat fault tolerant, minor errors like a missing closing tag do not lead to a parsing error.)
Before processing, all relative links within the page are rewritten to absolute links.
Automatic URL rewriting: FIT takes care of properly rewriting all references to other pages (
<a href="...">). URLs that point to sources that are not configured in the source management are rewritten to absolute URLs. I.e. when clicking on such a link, FIT is left and the user surfs on the original source. URLs that point to configured sources are rewritten to point to the FIT Server. In this case, the source URL is shortened according to the rules of the configured URL-Map and then encoded into the URL. Of course you can avoid automatic rewriting with the appropriate Adaptation Instructions.
Treatment of images: Images are adjusted by the FIT Server. For example, the image size will be individually adapted for each device. For that, the URLs are rewritten accordingly. You can recognize rewritten image URLs by the URL mark
Finally, the document is sent as the response to the browser.