Project

General

Profile

Bug #8972

WResource::setInternalPath does not work

Added by Geert Verbruggen 9 months ago. Updated 5 months ago.

Status:
Closed
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


Related issues

Related to Bug #9523: Wt 4.6.0 regression: possible null dereference in WebSession::resourceRequestClosedKorneel Dumon12/20/2021

Actions

Also available in: Atom PDF