small changes to requesthandler and sql
Merge branch 'master' of github.com:PubDig/pubdig