Change Log for OpenResty 0.4.2 Sep 27 2008 * demo/BlogAdmin - added a new demo app. * added documentation for metamodel duplication and recovery tools bin/save-metamode.pl and bin/restore-metamodel.pl to the OpenResty::Spec::Upgrading document. * added the link to my Y!ES talk's slides to OpenResty's main POD. 0.4.1 Sep 25 2008 * demo/RestyCheck - added dispatcher and timer. * demo/Click4honor - use leading underscore for builtin url parameters. * demo/Springbot - ** various improvements for the staff searching feature ** fixed the builtin url parameter syntax for OpenResty interaction. * demo/Blog - ** fixed the titles for init.pl. ** fixed the RSS links. * demo/Admin - fixed the appearance of the create model row panel. * CompiledView handler - use read_only => 1 for DB requests. * Feed handler - ignore potential errors in time_pg2rss. * Pg backend - now we cached the set_user operation. * Login handler - fixed a bug regarding login method mismatch. * added the bin/httpresty.pl script for doing HTTP REST on the command line. * fixed the infinite-looping bugs in bin/tab2json.pl. * Makefile.PL - now we demand CGI::Coookie::XS 0.15. The earlier versions have serious vulnerabilities. 0.4.0 Sep 1 2008 * updated the metamodel to version 0.006. * added a "prohibiting" property to ACL rules so that these rules with "prohibiting" set to true can deny certain accesses specifically. Prohibiting rules have higher priority than ordinary "white rules". * refactored the server kernel and now the kernel is almost independent of the various handler classes, so the user can code up their own handler classes w/o modifying the OpenResty kernel. * added a frontend.handler option to the config file to allow the site runner specify exactly which handlers to be loaded to the server kernel. * added support for GET /=/version and GET /=/version/more. * now we only allow _user/_password/_use_cookie/_session/etc for builtin params. * no longer encode/decode stuff when the encoding is already UTF-8. * no longer die when metamodel's version mismatch (merely warn instead). * fixed the cache bug regarding DELETE_role_list. * do not check password in Role.pm and allow special chars in the password. * demo/Onccf - a new demo web site based on OpenResty * demo/Onccf - added the pod2html.js script, which is a JavaScript implementation for the pod2html script. * demo/Admin - always display every fields in the model row listing even if the value is an empty string * demo/Admin - now we have a more pretty login UI. * demo/Admin - now we use true POST for updating and inserting row values. * demo/Admin - fixed the page width of the model row view and also use POST for model row creation. * demo/Admin - fixed the newline to textarea mapping. * added a new script for saving metamodels for every account: bin/save-metamodel.pl. * added a new script named bin/restore-metamodel.pl for restoring metamodels saved by bin/save-metamodel.pl. * added a new script bin/tab2json.pl. * added view precompilation support: ** a new CompiledView handler ** commandline interface for compiling view invocation urls to the compiled.view file which could be loaded by the CompiledView handler: $ bin/openresty compile '/=/view/a/b?c=d' '/=/view/f/z/okay?foo=bar' * perl minisql compiler - added support for operators @ and ~ * haskell restyscript compiler - added support for type signature to the frags emitter, as in select * from foo(...) as (col1 type1, col2 type2) where ... 0.3.21 Aug 20 2008 * fixed the ACL mechanism; now we allow ACL rules like GET /=/~/~/~/~. * fixed the "space-in-column-name" bug for POST model column API reported by carrie++ * fixed the default value issue for creating model column of the serial type, reported by zhu jingjing++, our QA girl ;) * fixed a bug in GET /=/model/Foo/~/query and also added t/38-global-search.t to test it. * perl minisql compiler - added support for as (col type, col2, type2, ...). * perl minisql compiler - added support for the prefix_range column type as well as the @> operator. * added support for char(xxx) colmun type in the Model handler. * applied the validator quasiquote to the Model handler. * applied the sql quasiquote to all the handlers. * added more POD to OpenResty::Limits as per cnhackTNT++'s suggestion. * added a new document OpenResty::Tutorial::RunTestsOnWin32_cn * renamed OpenResty::Spec::Installation to OpenResty::Spec::Install. * renamed OpenResty::Spec::Installation::Binary to OpenResty::Spec::Install::Binary_cn. * demo/Admin - implemented the bulk row import and table row truncating interfaces. * demo/Admin - added (all-column) search box to model row panel. * removed bin/test-account-admin.sh. * demo/Springbot - added timeout to springbot. * demo/Springbot - added more ext to the filter. 0.3.20 Jul 31 2008 * started an initial (naive) implementaion of OpenHesty, a pure Haskell rewrite of the Perl OpenResty server. * demo/Blog - renamed the anchor in favor of the style #foo/bar/baz. * demo/Blog - added full-text-search interface via Pg's tsearch2 support. * no longer checks model existence in aliased subquery. * now we do check model existence in PUT view. * perl minisql compiler: added support for "order by proc(...)". * perl minisql compiler: allowed "is not null". * Model API - added some geometric data types to the Model handler, i.e. point, line, lseg, and path. 0.3.19 Jul 25 2008 * perl minisql compiler: implemented subquery in from clause and where clause. * now we cache the view definition during view invokation as well. * added the frontend.use_gzip option to the config file and added builtin gzip support to the OpenResty server. * added the script bin/test-account-admin.sh. * now the old minisql parser supports "from foo as bar". * added jsmin support to demo/Admin and demo/Blog as well. * demo/Admin - added total row count to the model row page. * get_all_accounts now sets the current user to _global before querying _global._accounts, which fixed the "\u" crash after "\u foo". * fixed the email address in POD. * added the misc dir to Makefile.PL's no_index. * now we sort the account list while doing \u in the OpenResty Shell. * added --ignore-dup-error and --add-id options to the bin/import-model.pl script. * set_user now include the "public" schema in the search_path as well. 0.3.18 Jul 22 2008 * Builtin parameters like user, password, session, use_cookie, limit/count, offset, last_response, var, callback, and charset are not renamed to the form with a leading underscore, as in _user, _password, _session, _use_cookie, _limit/_count, _offset, _last_response and etc. The old form is still supported in the short term but is now deprecated. * added missing files for misc/restylog/. * (highly) experimental PL/Perl support (just as a proof of concept). 0.3.17 Jul 18 2008 * now we always sort the model/role/view/feed list by id asc. * now the "type" attribute is no longer optional while creating models and columns. 0.3.16 Jul 18 2008 * checks /etc/openresty/site_openresty.conf and /etc/openresty/openresty.conf when \$FindBin::Bin/etc/*.conf are not found. * now "make install" also installs haskell/bin/restyscript in case it exists. * added the misc/restylog utility for analysing lighttpd log for the OpenResty server. * added hint for editing the config file when the user starts the OpenResty server with the PgMocked backend enabled. * updated the docs to reflect the fact that we now use api.openresty.org for our main OpenResty server hosted by Yahoo! China. * updated the docs to reflect that we host the admin site now at http://openresty.org/admin/. * added an onerror handler to openresty's get method and now it croaks on failed HTTP requests like 404, 503 and bad address :) * demo/Admin - fixed an IE issue in admin.js regarding deleting a model row and adding the first model row. * demo/Admin - now it displays the loading flag during logging and also croaks on bad request by means of openresty.js's new onerror handler. * added the LICENSE file. * added debian packaging utilty. now "make -f dev.mk debian" will create a .deb file for OpenResty. * added some POD to OpenResty::Config. * added a section to OpenResty::Spec::Installation for system-wide installation of OpenResty. * skipped t/21-capthca.t in pgmocked and recording mode. 0.3.15 Jul 15 2008 * used the prompt function rather than in Makefile.PL as per Sanko Robinson's suggestion. * various improvements of OpenResty::Spec::GettingStarted_cn. * updated the document OpenResty::Spec::REST_cn. 0.3.14 Jul 14 2008 * fixed a bug regarding set_user("_global") which breaks creating the first OpenResty account on a fresh Pg. * now we specify the MaxRows option when calling DBI's selectall_arrayref. * renamed the Admin API to Unsafe API. * introduced the frontend.unsafe and test_suite.test_unsafe options and also disabled the Unsafe API by default. * added some POD for various classes. * added a new POD document OpenResty::Tutorial::GetttingStarted_cn. 0.3.13 Jul 11 2008 * now we enclose the stats log generation code with an eval rather than die the whole fastcgi process. * added POD to the bin/openresty script. 0.3.12 Jul 10 2008 * now we no longer check the metamodel version when doing upgrade (it was a cycle.) 0.3.11 Jul 10 2008 * fixed a failure when the config option frontend.stats_log_dir is set to an empty string. 0.3.10 Jul 10 2008 * added (basic) POD docs to most of the .pm files. * added the OpenResty::Spec::TestSuite document. * added the OpenResty::Spec::Installation document. * added the OpenResty::Spec::AccountAdmin document. * added the OpenResty::Spec::Upgrading document (for real this time). 0.3.9 Jul 9 2008 * added the OpenResty::Spec::Upgrading document. * now we check if the version of the metamodel is up-to-date during server startup. 0.3.8 Jul 9 2008 * now we can update a col's default back to null and empty strings. * allowed type ltree in model columns. * added a new config option frontend.stats_log_dir. * now we cache has_role as well as the role's login method * added naive support for the unique key in column spec while creating models. * now we check unrecognized keys in column spec while creating models * added 34-unique.t and its pgmocked data * now "trivial" cache gets completely disabled in recording mode or pgmocked mode 0.3.7 Jul 1 2008 * Bumped the metamodel version number to 0.005. * Fixed the long standing bug regarding the model column default values saved in the metamodel. * Exposed the Feed API in the Admin site demo. * Now we use _rand in openresty.js for defeating web browser caching. * Now we allow multiple views with identical definitions. 0.3.6 Jun 25 2008 * Now we check the minisql's syntax when the user updates the view's definition. * Added a new demo, RestyCheck, which is a quick health-checker for *any* OpenResty server. * The built-in action RunAction is now feature-complete. * Added support for Pg network addresses' <<, <<=, >>, and >>= operators to minisql. * The InitFatal error now respects url params like callback and var * Added OpenResty::Inlined to enable recursive calling of the process_dispatcher method of OpenResty::Dispatcher * Added support for the ip4r type * Purge the (file) cache in startup * Removed file paths from the low-level DB error messages which may expose security holes * Fixed the restyscript compiler wrapper class OpenResty::RestyScript which has some problem with IPC::Run::run on our production machines ced02.search.cnb and proxy12.search.cnb * Removed the whitespaces in solution used in cache key which has problems in memcached * haskell/restyscript - added an optimized2 goal to Makefile to use -fvia-c and -optc-O3 and it makes the restyscript compiler about 20% faster :D 0.3.5 Jun 17 2008 * Now we require 2 OpenResty test accounts to run the test suite. * Optimized the server by reducing DB queries via agressive user of caching. * Bypassed some checks for builtin roles Admin and Public to reduce DB uses. * Added tsearch2 related data types tsvector and tsquery to the Model API. * Added support for tsearch2's @@ operator to minisql. * Renamed the builtin action .Select to RunView and also reimplemented it by the restyscript compiler in Haskell. * Implemented half of the RunAction builtin action via the restyscript compiler in Haskell. * Added a new "trivial" param to OpenResty::Cache's set method to identify not-so-important caching which is disabled by the backend.recording option or backend.type option in the config file. * Updated the INSTALLATION doc to mention a second test account required to run the test suite. 0.3.2 June 3 2008 * The perl minisql parser now accepts tsearch2 queries. * Added support for varchar(\d+) for Model columns' types. * Added support for select distinct ... in the perl minisql parser. * Worked around a JSON::XS issue in perl 5.10.0 in t/13-count.t and t/03-model.t * Updated the bundled Module::Install to the latest version on CPAN [RT #36389]. * Various improvements for the Haskell version of restyview compiler under haskell/. 0.3.1 May 26 2008 * Now the Captcha handler no longer stores IDs in the cache. * Upgraded the metamodel to 0.004 by adding storage for the new Captcha API. * Fixed the global metamodel initialization logic (a fresh install works now) * Added massive documentation, like an initial draft for the Perl GettingStarted tutorial. * Added a new demo, Click4honor, which was an NCP widget. * Lots of improvements to the Blog demo. * Added a working Haskell implementation for the minisql compiler for view (restyview) under haskell/. But it is not yet hooked into the server. 0.2.2 April 23 2008 * Put OpenResty under Artistic Licence 2.0. * Fixed various nits in OpenResty::Spec::Overview. * Fixed a typo in the INSTALLATION section in OpenResty.pm. * Updated the CheatSheet document to reflect recent changes. 0.2.1 April 22 2008 * Added the OpenResty::Spec::Overview document. 0.2.0 April 21 2008 * Now we save the hex MD5 form of role passwords in the _roles table. * Updated the openresty.js client lib accordingly. * Added OpenResty::FeedWriter::RSS and the Feed handler to implement the basic Feed API. * Reported the PL/proxy server's hostname in the openresty shell if the backend is "PgFarm". * Put a note regarding password encryption in CheatSheet per Dylan Tynan's suggestion. * Checked if an OpenResty view already exists before creating it. * Finished the catpcha handler refactoring documentation (chaoslawful). * demo/Blog - implemented the Archives module using enhanced minisql syntax. * Renamed MiniSQL to RestyScript since it will no longer be a subset of SQL anyway. * Added support for various operations (including +, -, *, /, ^, ||, and %) in the RestyScript compiler. * Fixed the "like" operator in the restyscript compiler for views. * demo/Admin - the general-purpose OpenResty admin site is now functional and CRUD operations for models, model columns, model rows, views, and roles have been fully implemented. I've also put a compiled version at http://openresty.org/admin/ ). * Upgraded the metamodel to 0.003 0.1.10 April 4 2008 * Optimized the row bulk insertion and model bulk deletion operations. They are now much much faster. * Now we use the ping method to test the DBI handle. * Added demo/Blog2 for eeeeworks.org * Added demo/SpringBot which is an IRC bot using OpenResty for storage. * Pushed import-model.pl and export-model.pl into a pretty good shape. * Added support for the Pg network address types and bigint to the Model handler. 0.1.9 Mar 24 2008 * Implemented the MetaModel automatic upgrading mechanism. * Using MetaModel 0.001 now. * Switched to JSON::XS from JSON::Syck for JSON input/output. * Fixed a bug in GET /=/model/col/UTF8 reported by qyliu++. * Fixed a bug regarding captcha ID in cookies. * Added support for "boolean" to the type checker. 0.1.8 Mar 18 2008 * Fixed a typo in Base.pm 0.1.7 Mar 17 2008 * Added OpenResty::Spec::MetaModel. 0.1.6 Mar 16 2008 * Fixed another randomness caused by float-point numbers. 0.1.5 Mar 14 2008 * Fixed the version number for OpenResty::FastCGI to amuse the PAUSE indexer. 0.1.2 Mar 14 2008 * Added much more stuffs to CheatSheet. 0.1.1 Mar 13 2008 * Fixed a random regression caused by the inherent errors in float-point numbers. * Fixed a bunch of English typos in the POD. 0.1.0 Mar 11 2008 * Asked the user for permission before downloading font/wqy-zenhei.ttf from agentzh.org ( http://rt.cpan.org/Public/Bug/Display.html?id=33982 ) * Implemented the PgMocked backend which mocks up the Pg backend using t/pgmocked-data.json. 0.0.11 Mar 7 2008 * Removed uncomm!ented "use Smart::Comments" from the source. 0.0.10 Mar 6 2008 * No longer croak on the INSTALLDIRS=site argument and others fed to Makefile.PL * Various improments to the POD. * Moved "use Data::UUID" from OpenResty::Dispatcher to OpenResty.pm. * Fixed the InitalFatal in OpenResty::connect bug. * Fixed a bug in WWW::OpenResty::Embedded by requiring HTTP::Response 1.53 * Fixed the view creation syntax in REST_cn.pod. * Fixed bin/openresty in dev.mk * Fixed a bug in the Version handler (regarding the version number with 3 fields) * Renamed the various OPENAPI_* environments to OPENRESTY_* 0.0.9 Mar 5 2008 * Renamed doc/cheat-sheet.txt to OpenResty::CheatSheet. 0.0.8 Mar 5 2008 * minor tweaks in POD 0.0.7 Mar 5 2008 * Renamed yuting++'s opensearch.pod to OpenResty::Spec::Arch_cn. 0.0.6 Mar 5 2008 * Restricted OpenResty::Handler::* within their own packages to help CPAN indexer. 0.0.5 Mar 4 2008 * Initial CPAN release 0.0.4 Dec 28 2007 * Finished first draf of view support [laser] * Added Backend directory to put database access layer code. [laser] * Added Changes files. * Updated README. * lib/OpenResty.pm: change $Backend->select to $self->select to reduce confusion.