TIP HttpHeaderPlugin is not installed on Foswiki.org.

HTTP Header Plugin

Add additional lines to the HTTP header of a page.


This macro lets you set (any) additional HTTP header lines. You may want to use this make a wiki page downloadable as a file or set a different Content-Type.


%ADDHTTPHEADER{ name="Content-Type" value="text/plain" }%

The next block shows the wiki text of a more complex example:

%ADDHTTPHEADER{ name="Content-Type" value="text/x-vcard" }%%ADDHTTPHEADER{ name="Content-Disposition" value="attachment; filename=\"%WIKINAME%.vcf\"" }%BEGIN:VCARD
FN:%FORMFIELD{ "FirstName" topic="%USERSWEB%.%WIKINAME%" }% %FORMFIELD{ "LastName" topic="%USERSWEB%.%WIKINAME%" }%
N:%FORMFIELD{ "LastName" topic="%USERSWEB%.%WIKINAME%" }%;%FORMFIELD{ "FirstName" topic="%USERSWEB%.%WIKINAME%" }%;;;
ADR;HOME:;;%FORMFIELD{ "Address" topic="%USERSWEB%.%WIKINAME%" }%;%FORMFIELD{ "Location" topic="%USERSWEB%.%WIKINAME%" }%;;
 %META:PREFERENCE{name="SKIN" title="SKIN" type="Set" value="text"}%
 %META:PREFERENCE{name="COVER" title="COVER" type="Set" value="text"}%
(Please strip the heading space in front of the META lines.)

Copying this to a fresh topic lets you download a vcard of the currently logged-in user (assuming there is a filled UserForm.

Installation Instructions


Author(s): Foswiki:Main.OliverKrueger
Copyright: © 2010 Oliver Krüger, (wiki-one.net)
License: GPL (Gnu General Public License)
Version: 1.0
Change History:
21 Sep 2010 Initial version.
Home page: http://foswiki.org/bin/view/Extensions/HttpHeaderPlugin
Support: http://foswiki.org/bin/view/Support/HttpHeaderPlugin

Topic revision: r1 - 21 Sep 2010, OliverKrueger - This page was cached on 15 Feb 2018 - 18:26.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License