#1828 Wiki/Smarty: HTTP headers are incorrect

HEAD_(CVS)
open-accepted
Michael Davey
5
2005-02-11
2005-01-08
Michael Davey
No

When Tiki generates a "page cannot be found" error
message, the "404 Not Found" header message isn't sent.
Instead, the regular "200 OK" is sent.

This causes robots (such as Google) and web proxies
respectively to archive or cache invalid pages. It
also prevents smart webclients and peers from
effectively managing bookmarks and links.

See:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5

Example of .php file that incorrectly sends 200 OK:
http://cvs.sourceforge.net/viewcvs.py/tikiwiki/tiki/tiki-likepages.php?rev=1.10&view=auto
(see the last if statement, towards the bottom of the file)

Discussion

  • Michael Davey
    Michael Davey
    2005-01-09

    • status: open --> open-accepted
     
  • Michael Davey
    Michael Davey
    2005-01-09

    Logged In: YES
    user_id=399326

    In Tiki, the headers are possibly sent (depending upon the
    route taken through the code) in a number of places:

    lib/wiki/wikilib.php
    tiki-setup.php
    the actual php page being called (such as tiki-likepages.php)
    the Smarty class (fetch() method)

    Smarty doesn't provide a method to access or mutate headers,
    but PHP does: http://www.php.net/manual/en/function.header.php

     
  • Michael Davey
    Michael Davey
    2005-02-11

    • assigned_to: nobody --> michael_davey