Hi,
When I wrote this tinny test, I first tried to use something with
mod_include. Because doc says "Data URLs can be embedded inline within
web pages using something like the |mod_include
<https://httpd.apache.org/docs/2.4/en/mod/mod_include.html>| module, to
remove the need for clients to make separate connections"
I tried something like:
<html>
<body>
<img src="<!--#include
virtual="/modules/data/images/SupportApache-small.png" --> ">
</body>
</html>
However, mod_data does not process the image. It returns around line 79,
where the comments states "base64-ing won't work on subrequests, it
would be nice if it did."
And the binary is then embedded in the response, instead of its base64
data:image equivalent string.
I was thinking that mod_data was there to allow such construction.
Did I miss something?
How does mod_data is supposed to be used?
CJ
Le 21/09/2018 à 21:24, jaillet...@apache.org a écrit :
Author: jailletc36
Date: Fri Sep 21 19:24:40 2018
New Revision: 1841632
URL: http://svn.apache.org/viewvc?rev=1841632&view=rev
Log:
Add test for mod_data
Added:
httpd/test/framework/trunk/t/htdocs/modules/data/
httpd/test/framework/trunk/t/htdocs/modules/data/SupportApache-small.png
(with props)
httpd/test/framework/trunk/t/modules/data.t
Modified:
httpd/test/framework/trunk/t/conf/extra.conf.in
Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL:
http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=1841632&r1=1841631&r2=1841632&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Fri Sep 21 19:24:40 2018
@@ -1286,3 +1286,9 @@ LimitRequestFields 32
</Location>
</IfModule>
</IfModule>
+
+<IfModule mod_data.c>
+ <Directory @SERVERROOT@/htdocs/modules/data/>
+ SetOutputFilter DATA
+ </Directory>
+</IfModule>
Added: httpd/test/framework/trunk/t/htdocs/modules/data/SupportApache-small.png
URL:
http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/data/SupportApache-small.png?rev=1841632&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
httpd/test/framework/trunk/t/htdocs/modules/data/SupportApache-small.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: httpd/test/framework/trunk/t/modules/data.t
URL:
http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/data.t?rev=1841632&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/modules/data.t (added)
+++ httpd/test/framework/trunk/t/modules/data.t Fri Sep 21 19:24:40 2018
@@ -0,0 +1,22 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+use Apache::TestRequest;
+
+my @testcases = (
[... 15 lines stripped ...]