Re: [Cppcms-users] script_name and path_info
Brought to you by:
artyom-beilis
From: CN <cn...@fa...> - 2016-04-15 07:57:51
|
Hi! Please ignore this question for this moment so that nobody's precious time will be wasted. I am responding to my own question before I have finished my study. My study so far on lighttpd's fcgi configuration makes me feel that script_name and path_info involves more lighttpd than CppCMS as shown here: http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI This helps myself a lot find out the answers for my own question - catching everything in cppcms::mount_point() like so: my_cppcms_service.applications_pool().mount(cppcms::create_pool<my_app>(),cppcms::mount_point(cppcms::mount_point::match_script_name,"(.*)",1),cppcms::app::synchronous) and print the environment variables in question here: my_app::main(std::string url) { BOOSTER_DEBUG("") << "SCRIPT_NAME=" << request().script_name() << ", PATH_INFO=" << request().path_info(); } By sending request "localhost:8080" from browser, what I get from request().script_name() now is "my_program" which I guess is either the socket name or the program name awaiting for me to investigate more... Cheers, CN On Thu, Apr 14, 2016, at 03:51 PM, CN wrote: > Hi! > > I am not quite sure this question is a generic one or specific to > CppCMS, HTTP servers, or fastcgi. Being a lazy man, I simply resort to > CppCMS community as the short cut. > > I have carefully read this article before raising this question: > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_url_mapping > > What still unclear to me is what will the respective script_name and > path_info be when a client might request for the following possible > URL's: > > /hello/number/10/ > /hello/number/10 > hello/number/10/ > hello/number/10 > > Will the leading and trailing slashes be trimmed off or integrally > preserved? Will a leading slash be automatically prepended to > script_name? > > I think clarification of its behavior is crucial if we want to correctly > catch or ignore requests when calling cppcms::mount_point(), > cppcms::url_dispatcher::assign(), cppcms::application::attach(), > cppcms::application::add(),.. etc. > > Best regards, > CN > > -- > http://www.fastmail.com - The professional email service > > > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications > Manager > Applications Manager provides deep performance insights into multiple > tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -- http://www.fastmail.com - The way an email service should be |