20190517_jeffrey - silenceuncrio/diary GitHub Wiki
0905
review 這禮拜做的
- M300 - https unstable
- give up on fastcgi soluvtion with lighttpd; use cgi solution
- 500 - Internal Server Error
- no time to find out the problem
- use url rewirte to rewrite '/api/whoAmI?uuid=0.xxxx' to '/cgi-bin/api.cgi?act=whoAmI'
- implement '/cgi-bin/api.cgi?act=whoAmI'
- always reply "{ "name": "guest", "level": 0 }"
- add jweb.out.json.whoAmI()
- implement '/cgi-bin/api.cgi?act=whoAmI'
- according to the session for authorization
- offer jweb.access.filter for multi-user with different level
- TBD: find user in session information and get the user level
- sntp.cgi use jweb.access.filter() for testing
- implement /cgi-bin/api.cgi?act=login
- TBD: create session
- TBD: set cookie
- give up on fastcgi soluvtion with lighttpd; use cgi solution
- M330
- schedule reboot
- M360 - web ui
- do not search neighbor PCIs again after 'Save for bootup locked'
- remove 'Locked PCIs' tab
- change wording 'Saved Locked PCIs' to 'Saved Locked PCI'
- change hint
- add a hint for 'LTE Net Mode' at 'LTE > Dual APN' page
寫週報
1000
繼續 M300 feature/lighttpd
1425
原本 mongoose 裡產生 session id 的方式我改用 UUID 這個 library 提供的方法來取代
1710
今天 M300 feature/lighttpd
走得非常地遠
下禮拜再三個工作天應該就可以收工了
先把今天的進度做個 commit
commit 752bdeba91c7dd58f414a5df742cef77574fc476
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date: Fri May 17 17:23:19 2019 +0800
offer the following api at jweb:
- jweb.api.login
- jweb.api.whoAmI
cgi_init() do 3 more things:
- icos_users_init()
- init the user information form MODULE_SYSTEM
- init_session_store()
- we need keep session information at ram for traditional CGI
- traditional CGI is not fast CGI
- check_sessions()
- trigger this at each time any CGI invoked
- Cleans up sessions that have been idle for too long.
implement session
- use UUID library to generate unique session id
proscend/prosrc/webcgi/Makefile | 2 +-
proscend/prosrc/webcgi/api.c | 43 +----
proscend/prosrc/webcgi/jweb.c | 397 ++++++++++++++++++++++++++++++++++++++--
proscend/prosrc/webcgi/jweb.h | 57 +++++-
proscend/prosrc/webcgi/sntp.c | 12 +-
5 files changed, 439 insertions(+), 72 deletions(-)