TIP HttpHeaderPlugin is not installed on Foswiki.org.

HTTP Header Plugin

Add additional lines to the HTTP header of a page.

Usage

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.

Examples

%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
VERSION:2.1
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%" }%;;
TEL;PREF;HOME:%FORMFIELD{ "Telephone" topic="%USERSWEB%.%WIKINAME%" }%
END:VCARD
 %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

Info

Author(s): Foswiki:Main.OliverKrueger
Copyright: © 2010 Oliver Krüger, (wiki-one.net)
License: GPL (Gnu General Public License)
Release:  
Version: 1.0
Change History:
21 Sep 2010 Initial version.
Dependencies:  
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 25 Aug 2016 - 11:55.

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