]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_data.xml
Merge in APR[-util] macros from branches/trunk-buildconf-noapr
[apache] / docs / manual / mod / mod_data.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_data.xml.meta">
24
25 <name>mod_data</name>
26 <description>Convert response body into an RFC2397 data URL</description>
27 <status>Extension</status>
28 <sourcefile>mod_data.c</sourcefile>
29 <identifier>data_module</identifier>
30 <compatibility>Available in Apache 2.3 and later</compatibility>
31
32 <summary>
33     <p>This module provides the ability to convert a response into
34     an <a href="http://tools.ietf.org/html/rfc2397">RFC2397 data URL</a>.
35     </p>
36
37     <p>Data URLs can be embedded inline within web pages using something
38     like the <module>mod_include</module> module, to remove the need for
39     clients to make separate connections to fetch what may potentially be
40     many small images. Data URLs may also be included into pages generated
41     by scripting languages such as PHP.</p>
42
43     <example><title>An example of a data URL</title>
44         data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw<br />
45         AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz<br />
46         ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp<br />
47         a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl<br />
48         ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis<br />
49         F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH<br />
50         hhx4dbgYKAAA7<br />
51     </example>
52
53     <p>The filter takes no parameters, and can be added to the filter stack
54     using the <directive module="core">SetOutputFilter</directive> directive,
55     or any of the directives supported by the <module>mod_filter</module>
56     module.</p>
57
58     <example><title>Configuring the filter</title>
59     <highlight language="config">
60 &lt;Location "/data/images"&gt;
61     SetOutputFilter DATA
62 &lt;/Location&gt;
63         </highlight>
64     </example>
65
66 </summary>
67 <seealso><a href="../filter.html">Filters</a></seealso>
68
69 </modulesynopsis>