Hey,

Some follow up questions:

>
> Is the following true?  If the deploy-path does not end in "/", then the
> ";"
> docroot syntax does nothing.  That is, the ";" and anything after it is
> effectively ignored.
>

Perhaps that statement wasn't as accurate: if the deploy-path does not end
with "/" I should have said, this not (as) useful, but it's not ignored.
Every path "/this/that" that follows ';' is interpeted as: requests for
"/this/that/*file.png*" are to be interpreted as a request for a static
file, to be retrieved from within the docroot. The path within the docroot
must then be "/this/that/..." (thus if docroot = ".", then the webserver
will try to read "./this/that/*file.png*".


> Is it true -- regardless of whether deploy-path ends in "/" -- that
> WApplication::docRoot() only returns the part of the --docroot
> command-line argument that appears before the ";"?  In a similar
> vein, does Wt provide a public api that gives the part of docroot
> after the ";" (or the whole docroot string)?
>

Yes. Because the ';' acts as a qualifier for wthttpd to decide what files
to look for in the docroot.


> Let me summarize my set up:  I have a subdirectory of my current
> working directory called static_links.  In it is a file, say, link1.html.
> If
> I deploy as "--deploy-path=/mixed_links/", a link (that evaluates) to:
>
>    http://localhost/static_links/link1.html
>
> links to the file successfully whether or not I use ";".  That is, both
> "--docroot="."" and "--docroot'".;/static_links"" work the same way,
> in that wthttpd serves link1.html as static content.
>

True.


> On the other hand, a link (that evaluates) to:
>
>    http://localhost/mixed_links/static_links/link1.html
>
> does not successfully link to the file.  The ";" syntax does have an
> effect, however.  If I deploy with "--docroot="."", the above link returns
> a 404, while if I deploy with "--docroot=.;/static_links", the above link
> gets processed as an internal path in my application (but wthttpd does
> not serve the link1.html file as static content).
>

Not quite so:
- with "--deploy-path=/mixed_links/ --docroot="."", Wt will interpret this
request as an internal path (as it matches the deploy-path of an
application)
- with "--deploy-path=/mixed_links/ --docroot=.;/static_links", just the
same because '/mixed_links/static_links/' does not match '/static_links'
- with "--deploy-path=/mixed_links/ --docroot=.;/mixed_links/static_links",
the request will be interpreted as request for a static file within docroot.


> Well, right now, I am just trying to understand how things work.  (Right
> now,
> I'm playing around, but my "learning goal" would be to serve a web site
> with
> wthttpd at "http://hostname/"; or, if necessary, "http://hostname/app_name";
> and have both internal-path links and static-content links underneath that
> top-level "landing page," e.g., "http://hostname/internal_path_link1"; and
> "http://hostname/static_content_link";.)
>
> Just to be clear, I may be trying to do something that wthttpd doesn't do
> (or doesn't do without some sort of hackery).  That's okay, too.  I just
> want to understand what wthttpd (and Wt in general) does do, and, then,
> how to do it.
>

I think Wt is quite flexible in terms of URL handling (in spite of being
unconventional).

I hope the clarifications help.

Regards,
koen
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to