Actions
Bug #11423
closedWt warns about WResource::setInternalPath(): adding '/' to start of internal path for static resources
Start date:
03/10/2023
Due date:
% Done:
100%
Estimated time:
Description
Since Wt 4.1.0 we prepend the --deploy-path
to static resources deployed at a path that doesn't start with a slash.
We still get this warning however:
WResource: setInternalPath(): adding '/' to start of internal path:
Attached is some sample code to demonstrate this issue.
Some proposed solutions:
- Don't do
setInternalPath()
inWServer::addResource()
.WResource::internalPath()
would then just return the empty string for static resources. This would change the behavior ofinternalPath()
. I'm not sure if anyone is relying on it, though, since it doesn't really make much sense for a static resource. - Also prepend the deployment path before setting the internal path.
WResource::internalPath()
would then be the last path assigned withaddResource
, with the deploy-path prepended.
Files
Updated by Roel Standaert almost 2 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
Updated by Roel Standaert almost 2 years ago
- Status changed from InProgress to Review
- Assignee deleted (
Roel Standaert)
Updated by Roel Standaert over 1 year ago
Turns out we're already setting the WResource::url()
to be the entire path. I think then it's probably most accurate to not call setInternalPath(...)
, since internalPath()
doesn't make sense in the case of static resources (There's no WApplication
, so internal to what?).
Updated by Roel Standaert over 1 year ago
- Status changed from Review to Implemented @Emweb
- Assignee set to Roel Standaert
- % Done changed from 0 to 100
Updated by Roel Standaert over 1 year ago
- Status changed from Implemented @Emweb to Resolved
Updated by Matthias Van Ceulebroeck over 1 year ago
- Status changed from Resolved to Closed
Actions