DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:action_headers_send

This is an old revision of the document!


ACTION_HEADERS_SEND

Description:
modify the HTTP headers sent by Dokuwiki
DefaultAction:
output all the headers in order using the header() function
Preventable:
yes
Added:
2006-04-25

This event is signalled by act_dispatch() in inc/actions.php after preparing the headers and before loading the template.

Passed Data

The passed Doku_Event object has the fields: $data and $result.

The $data field is an array of header strings. This array has default one entry:

  • the DokuWiki header 'Content-Type: text/html; charset=utf-8'.

The BEFORE handler of this event can add/modify/delete the headers in the $data field. The event data must remain an array, even if emptied. The default action act_sendheaders() will output the headers, but this can be prevented by preventDefault().

The $result field is always null, because the default action don't set this field. The AFTER event handlers comes (default) after outputting the headers.

Plugins handling this event

The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.

See also

devel/event/action_headers_send.1527606507.txt.gz · Last modified: 2018-05-29 17:08 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki