You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2018/09/21 19:24:40 UTC

svn commit: r1841632 - in /httpd/test/framework/trunk/t: conf/extra.conf.in htdocs/modules/data/ htdocs/modules/data/SupportApache-small.png modules/data.t

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 ...]


Re: svn commit: r1841632 - in /httpd/test/framework/trunk/t: conf/extra.conf.in htdocs/modules/data/ htdocs/modules/data/SupportApache-small.png modules/data.t

Posted by Christophe JAILLET <ch...@wanadoo.fr>.
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, jailletc36@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 ...]
>
>