Project

General

Profile

Bug #8972

WResource::setInternalPath does not work

Added by Geert Verbruggen 4 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
08/17/2021
Due date:
% Done:

100%

Estimated time:

Description

Following code works fine:

myResource_ = std::make_unique<MyResource>();
//myResource_->setInternalPath("myresource");
root()->addWidget(std::make_unique<WAnchor>(WLink(myResource_->url()), "Resource"));

(with MyResource subclass of WResource)
Clicking on the link displays the content generated by myResource_, as expected

However when the second line is uncommented the clicking on the link returns a 403 forbidden error.
Also entering the url as

http:///myresource or http:///?_=myresource

does not work. Tested with Wt 4.5.0

Also available in: Atom PDF