[pLog-svn] forum/bugs help: 404 errors not being sent?

Jon Daley plogworld at jon.limedaley.com
Fri Jan 11 07:33:58 EST 2008


On Fri, 11 Jan 2008, Mark Wu wrote:
> If the article does not exist, the viewarticleaction will use the errorview
> to show the error messasge "fetch article error"
 	Yes, I agree.

> So, lifetype does return a  "HTTP/1.0 200 OK"; to this invalid url ... from
> the very beginning version, we already do this.
 	I did look through previous versions, and I saw that it looked 
like we always returned a 200 instead of a 404 on missing/invalid pages.

> Anyway, If  user insist to do that, mmm..... then he should modify the
> viewarticleaction to change reponse status from 200 to 404 like the
> following ....
 	Oh, that's better than my solution, I was trying to modify the 
error view, but since it is used in different places, ie. not 404 
conditions, I got stuck.
 	So, why shouldn't this be added to the core code?  It seems like 
this is the right behavior to me, ie. return a 404 when a page can't be 
found?


> 		function _setErrorView()
> 		{
> 			$this->_view = new ErrorView( $this->_blogInfo );
> 			$this->_view->setValue( "message",
> "error_fetching_article" );
> 			$this->_headers[0] = "HTTP/1.0 404 Not Found";
> 			$this->setCommonData();
> 		}


More information about the pLog-svn mailing list