Changes between Version 8 and Version 9 of soc/2007/cgi
- Timestamp:
- May 29, 2007, 1:25:10 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
soc/2007/cgi
v8 v9 121 121 === Random Notes === 122 122 123 * The active requests queue should hold ```boost::weak_ptr<basic_request<> >```s. That means that the request will be properly destroyed unless it's on the pending requests queue or actually being handled by user code. ''Note: to keep it alive during asynchronous requests, the user should be using a function object with a ```boost::shared_ptr<request_base>``` that they pass to the Handler given to the async request. 123 * The active requests queue should hold ```boost::weak_ptr<basic_request<> >```s. That means that the request will be properly destroyed unless it's on the pending requests queue or actually being handled by user code. ''Note: to keep it alive during asynchronous requests, the user should be using a function object with a ```boost::shared_ptr<request_base>``` that they pass to the Handler given to the async request.'' 124 124 * The standard CGI sub-library should be header-only. Ideally the other parts (eg. fcgi_service) will be either header-only or compilable, with compilable as the default: a multi-process FastCGI server pool is the most common use, so using a shared '[MVC-]controller' library is likely to be quite effective. 125 * Is there a need for a ```boost::lexical_cast<>``` wrapper? Such as ```cgi::param_as<char,cgi::GET>("blah")``` ''or'' ```cgi::get_as<int,cgi::POST>("user_id")```. Consider: 126 {{{ 127 #!cpp 128 void a() 129 { 130 int id = 4096; 131 cgi::request req; 132 if( boost::lexical_cast<std::string>(req.param<cgi::POST>("user_id")) > (id / 4) && 133 req.param_as<int,cgi::POST>("user_id") != id ) 134 // ... 135 } 136 }}}