Aarón Bueno Villares
2016-01-08 15:48:03 UTC
(Sorry for my previous message with the same subject; it has been sent from
another email account of mine by mistake)
If I deploy my app under an internal directory inside the DOCUMENT_ROOT,
for example:
DocumentRoot /var/www/mydomain
and my Wt executable is at /var/www/mydomain.com/int/app.wt, and the user
type to his browser www.mydomain.com/int/app.wt/foo/bar, bookmarkUrl()
returns app.wt/foo/bar instead of /int/app.wt/foo/bar. The documentation
says:
The returned URL concatenates the internal path to the application base URL.
So, it says that bookmarkUrl returns an absolute URL, but according to your
source code (WebSession.C):
- applicationUrl_ = SCRIPT_NAME (/int/app.wt),
- deploymentPath_ = the same (although I don't understand the intented
semantic difference between both of them),
- basePath_ = /stuff/,
- applicationName_ = app.wt (extracted from applicationUrl_).
- absoluteBaseUrl_ = scheme()://HOST_NAME + basePath_ (
http://mydomain.com/int/)
- bookmarkUrl_ =applicationName_ (app.wt)
So, I understand that application base URL means the absoluteBaseUrl_,
which must be concatenated to bookmarkUrl_ and the internal path
(/foo/bar), according to the documentation. However, that last
concatenation doesn't happen, and you get bookmarkUrl_ + PATH_INFO
(app.wt/foo/bar), which is (A) an incomplete PATH and (B) not an absolute
URL.
The only way to solve that would be defining the property baseURL in
wt/wt_config.xml (provided it's different from absoluteBaseUrl_, because if
they are both equals, the baseURL value is ignored and the other variables
are not refreshed), but I think that's not the intented behaviour.
Best regards,
Peregring-lk.
another email account of mine by mistake)
If I deploy my app under an internal directory inside the DOCUMENT_ROOT,
for example:
DocumentRoot /var/www/mydomain
and my Wt executable is at /var/www/mydomain.com/int/app.wt, and the user
type to his browser www.mydomain.com/int/app.wt/foo/bar, bookmarkUrl()
returns app.wt/foo/bar instead of /int/app.wt/foo/bar. The documentation
says:
The returned URL concatenates the internal path to the application base URL.
So, it says that bookmarkUrl returns an absolute URL, but according to your
source code (WebSession.C):
- applicationUrl_ = SCRIPT_NAME (/int/app.wt),
- deploymentPath_ = the same (although I don't understand the intented
semantic difference between both of them),
- basePath_ = /stuff/,
- applicationName_ = app.wt (extracted from applicationUrl_).
- absoluteBaseUrl_ = scheme()://HOST_NAME + basePath_ (
http://mydomain.com/int/)
- bookmarkUrl_ =applicationName_ (app.wt)
So, I understand that application base URL means the absoluteBaseUrl_,
which must be concatenated to bookmarkUrl_ and the internal path
(/foo/bar), according to the documentation. However, that last
concatenation doesn't happen, and you get bookmarkUrl_ + PATH_INFO
(app.wt/foo/bar), which is (A) an incomplete PATH and (B) not an absolute
URL.
The only way to solve that would be defining the property baseURL in
wt/wt_config.xml (provided it's different from absoluteBaseUrl_, because if
they are both equals, the baseURL value is ignored and the other variables
are not refreshed), but I think that's not the intented behaviour.
Best regards,
Peregring-lk.