Project

General

Profile

Bug #4657

Returning 404 code in Wt app

Added by Alan Finley over 6 years ago. Updated over 6 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
Start date:
01/11/2016
Due date:
% Done:

0%

Estimated time:

Description

I would like to return 404 http code for pages that do not exist in my Wt app.

If I use WApplication::setInternalPathValid, I get 200 response code anyway:

Wt::WApplication* createApplication(const Wt::WEnvironment& env)
{
    Wt::WApplication *app = new Wt::WApplication(env);
    app->setInternalPathValid(false);
    return app;
}

I don't want to redirect a user to some static html page with some error text in it. The incorrect url should remain the same, like http://www.google.com/dfsdfjk

Also available in: Atom PDF