1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#include "common.h" namespace linterra { namespace net { buffer module_id(const buffer& url) { int idx = url.find("?"); if(idx != -1) { buffer hash = url.substr(0, idx); return hash.sha1(); } return url.sha1(); } }; // end namespace server }; // end namespace linterra |