diff --git a/winixd/Makefile.dep b/winixd/Makefile.dep index a801c4c..eec0f8c 100644 --- a/winixd/Makefile.dep +++ b/winixd/Makefile.dep @@ -1 +1 @@ -winix.src.files = ./core/app.h ./core/basethread.cpp ./core/acceptbaseparser.cpp ./core/acceptbaseparser.h ./core/acceptencodingparser.h ./core/basethread.h ./core/config.cpp ./core/config.h ./core/compress.cpp ./core/compress.h ./core/crypt.cpp ./core/dircontainer.cpp ./core/cookieparser.h ./core/request.cpp ./core/crypt.h ./core/cur.h ./core/winixmodeldeprecated.cpp ./core/app.cpp ./core/dircontainer.h ./core/dirs.cpp ./core/dirs.h ./core/error.h ./core/filelog.cpp ./core/filelog.h ./core/groups.cpp ./core/groups.h ./core/httpsimpleparser.cpp ./core/httpsimpleparser.h ./core/image.cpp ./core/image.h ./core/ipban.h ./core/ipbancontainer.cpp ./core/ipbancontainer.h ./core/job.cpp ./core/job.h ./core/lastcontainer.cpp ./core/lastcontainer.h ./core/loadavg.cpp ./core/loadavg.h ./core/lock.h ./core/lock.cpp ./core/log.cpp ./core/log.h ./core/logmanipulators.h ./core/misc.cpp ./core/misc.h ./core/mount.cpp ./core/mount.h ./core/mountparser.cpp ./core/mountparser.h ./core/mounts.cpp ./core/mounts.h ./core/plugin.cpp ./core/plugin.h ./core/plugindata.cpp ./core/plugindata.h ./core/pluginmsg.h ./core/postmultiparser.cpp ./core/postmultiparser.h ./core/postparser.h ./core/rebus.cpp ./core/rebus.h ./core/request.h ./core/requesttypes.h ./core/run.cpp ./core/run.h ./core/session.cpp ./core/session.h ./core/sessioncontainer.cpp ./core/sessioncontainer.h ./core/sessionidmanager.cpp ./core/sessionidmanager.h ./core/sessionmanager.cpp ./core/sessionmanager.h ./core/sessionparser.cpp ./core/sessionparser.h ./core/slog.cpp ./core/slog.h ./core/synchro.cpp ./core/synchro.h ./core/system.cpp ./core/system.h ./core/textstream.h ./core/threadmanager.cpp ./core/timezone.h ./core/threadmanager.h ./core/timezone.cpp ./core/timezones.cpp ./core/timezones.h ./core/ugcontainer.h ./core/users.cpp ./core/users.h ./core/version.h ./core/winix_const.h ./core/winixbase.cpp ./core/winixbase.h ./core/winixrequest.cpp ./core/winixrequest.h ./core/winixsystem.cpp ./core/winixsystem.h ./core/winixmodeldeprecated.h ./core/header.h ./db/db.cpp ./db/db.h ./db/dbbase.cpp ./db/dbbase.h ./db/dbconn.cpp ./db/dbconn.h ./db/dbtextstream.cpp ./db/dbtextstream.h ./functions/account.cpp ./functions/account.h ./functions/adduser.cpp ./functions/adduser.h ./functions/cat.cpp ./functions/cat.h ./functions/chmod.cpp ./functions/chmod.h ./functions/chown.cpp ./functions/chown.h ./functions/ckeditor.cpp ./functions/ckeditor.h ./functions/cp.cpp ./functions/cp.h ./functions/default.cpp ./functions/default.h ./functions/download.cpp ./functions/download.h ./functions/emacs.cpp ./functions/emacs.h ./functions/env.cpp ./functions/env.h ./functions/functionbase.cpp ./functions/functionbase.h ./functions/functionparser.cpp ./functions/functionparser.h ./functions/functions.cpp ./functions/functions.h ./functions/imgcrop.cpp ./functions/imgcrop.h ./functions/ipban.cpp ./functions/ipban.h ./functions/last.cpp ./functions/last.h ./functions/ln.cpp ./functions/ln.h ./functions/locale.cpp ./functions/locale.h ./functions/login.cpp ./functions/login.h ./functions/logout.cpp ./functions/logout.h ./functions/ls.cpp ./functions/ls.h ./functions/man.cpp ./functions/man.h ./functions/meta.cpp ./functions/meta.h ./functions/mkdir.cpp ./functions/mkdir.h ./functions/mount.cpp ./functions/mount.h ./functions/mv.cpp ./functions/mv.h ./functions/nicedit.cpp ./functions/nicedit.h ./functions/node.cpp ./functions/node.h ./functions/passwd.cpp ./functions/passwd.h ./functions/priv.cpp ./functions/priv.h ./functions/privchanger.cpp ./functions/privchanger.h ./functions/pw.cpp ./functions/pw.h ./functions/reload.cpp ./functions/reload.h ./functions/rm.cpp ./functions/rm.h ./functions/rmuser.cpp ./functions/rmuser.h ./functions/run.cpp ./functions/run.h ./functions/sort.cpp ./functions/sort.h ./functions/specialdefault.cpp ./functions/specialdefault.h ./functions/stat.cpp ./functions/stat.h ./functions/subject.cpp ./functions/subject.h ./functions/template.cpp ./functions/template.h ./functions/timezone.cpp ./functions/timezone.h ./functions/tinymce.cpp ./functions/tinymce.h ./functions/uname.cpp ./functions/uname.h ./functions/upload.cpp ./functions/upload.h ./functions/uptime.cpp ./functions/uptime.h ./functions/vim.cpp ./functions/vim.h ./functions/who.cpp ./functions/who.h ./main/main.cpp ./models/group.cpp ./models/group.h ./models/item.cpp ./models/item.h ./models/itemcontent.cpp ./models/itemcontent.h ./models/migration.cpp ./models/migration.h ./models/user.cpp ./models/user.h ./models/userwrapper.h ./models/winixmodel.cpp ./models/winixmodel.h ./models/winixmodelconnector.cpp ./models/winixmodelconnector.h ./notify/notify.cpp ./notify/notify.h ./notify/notifypool.cpp ./notify/notifypool.h ./notify/notifythread.cpp ./notify/notifythread.h ./notify/templatesnotify.cpp ./notify/templatesnotify.h ./plugins/export/edb.cpp ./plugins/export/edb.h ./plugins/export/export.h ./plugins/export/exportinfo.cpp ./plugins/export/exportinfo.h ./plugins/export/exportthread.cpp ./plugins/export/exportthread.h ./plugins/export/funexport.cpp ./plugins/export/funexport.h ./plugins/export/init.cpp ./plugins/export/message.h ./plugins/gallery/gallery.cpp ./plugins/gallery/gallery.h ./plugins/gallery/galleryinfo.cpp ./plugins/gallery/galleryinfo.h ./plugins/gallery/init.cpp ./plugins/gallery/templates.cpp ./plugins/group/groupinfo.cpp ./plugins/group/groupinfo.h ./plugins/group/groups.cpp ./plugins/group/groups.h ./plugins/group/init.cpp ./plugins/group/templates.cpp ./plugins/mailregister/funregistermail.cpp ./plugins/mailregister/funregistermail.h ./plugins/mailregister/funregistermail_showusers.cpp ./plugins/mailregister/funregistermail_showusers.h ./plugins/mailregister/init.cpp ./plugins/mailregister/mdb.cpp ./plugins/mailregister/mdb.h ./plugins/mailregister/registermail_info.cpp ./plugins/mailregister/registermail_info.h ./plugins/mailregister/templates.cpp ./plugins/menu/cache.cpp ./plugins/menu/cache.h ./plugins/menu/init.cpp ./plugins/menu/templates.cpp ./plugins/seo/init.cpp ./plugins/seo/seo.cpp ./plugins/seo/seo.h ./plugins/stats/bot.cpp ./plugins/stats/bot.h ./plugins/stats/init.cpp ./plugins/stats/stats.cpp ./plugins/stats/stats.h ./plugins/stats/statssession.h ./plugins/stats/templates.cpp ./plugins/stats/templates.h ./plugins/thread/createthread.cpp ./plugins/thread/createthread.h ./plugins/thread/funthread.cpp ./plugins/thread/funthread.h ./plugins/thread/init.cpp ./plugins/thread/pluginmsg.h ./plugins/thread/reply.cpp ./plugins/thread/reply.h ./plugins/thread/showthreads.cpp ./plugins/thread/showthreads.h ./plugins/thread/tdb.cpp ./plugins/thread/tdb.h ./plugins/thread/templates.cpp ./plugins/thread/templates.h ./plugins/thread/thread.cpp ./plugins/thread/thread.h ./plugins/thread/threadfiles.cpp ./plugins/thread/threadfiles.h ./plugins/thread/threadinfo.cpp ./plugins/thread/threadinfo.h ./plugins/ticket/createticket.cpp ./plugins/ticket/createticket.h ./plugins/ticket/editticket.cpp ./plugins/ticket/editticket.h ./plugins/ticket/funticket.cpp ./plugins/ticket/funticket.h ./plugins/ticket/init.cpp ./plugins/ticket/pluginmsg.h ./plugins/ticket/sessiondata.cpp ./plugins/ticket/sessiondata.h ./plugins/ticket/showtickets.cpp ./plugins/ticket/showtickets.h ./plugins/ticket/tdb.cpp ./plugins/ticket/tdb.h ./plugins/ticket/templates.cpp ./plugins/ticket/ticket.h ./plugins/ticket/ticketinfo.cpp ./plugins/ticket/ticketinfo.h ./templates/adduser.cpp ./templates/antispam.cpp ./templates/changepatterns.cpp ./templates/changepatterns.h ./templates/config.cpp ./templates/currentdate.cpp ./templates/dir.cpp ./templates/doc.cpp ./templates/filters.cpp ./templates/generic.cpp ./templates/htmltextstream.cpp ./templates/htmltextstream.h ./templates/indexpatterns.cpp ./templates/indexpatterns.h ./templates/insert.cpp ./templates/ipban.cpp ./templates/locale.cpp ./templates/last.cpp ./templates/misc.cpp ./templates/locale.h ./templates/localefilter.cpp ./templates/localefilter.h ./templates/login.cpp ./templates/ls.cpp ./templates/man.cpp ./templates/misc.h ./templates/patterns.h ./templates/mount.cpp ./templates/passwd.cpp ./templates/patterncacher.cpp ./templates/patterncacher.h ./templates/patterns.cpp ./templates/priv.cpp ./templates/templates.h ./templates/rebus.cpp ./templates/server.cpp ./templates/slog.cpp ./templates/stat.cpp ./templates/sys.cpp ./templates/template.cpp ./templates/templates.cpp ./templates/user.cpp ./templates/textextstream.cpp ./templates/textextstream.h ./templates/upload.cpp ./templates/uptime.cpp ./templates/who.cpp ./templates/winix.cpp ../../ezc/src/blocks.cpp ../../ezc/src/blocks.h ../../ezc/src/cache.cpp ../../ezc/src/cache.h ../../ezc/src/expressionparser.h ../../ezc/src/ezc.h ../../ezc/src/functions.h ../../ezc/src/generator.h ../../ezc/src/models.h ../../ezc/src/item.cpp ../../ezc/src/item.h ../../ezc/src/objects.h ../../ezc/src/outstreams.h ../../ezc/src/pattern.cpp ../../ezc/src/pattern.h ../../ezc/src/patternparser.cpp ../../ezc/src/patternparser.h ../../ezc/src/funinfo.h ../../ezc/src/models.cpp ../../tito/src/aes.cpp ../../tito/src/aes.h ../../tito/src/base32.cpp ../../tito/src/base32.h ../../tito/src/base64.cpp ../../tito/src/base64.h ../../tito/src/crypto.cpp ../../tito/src/crypto.h ../../tito/src/misc.cpp ../../tito/src/misc.h ../../pikotools/src/convert/convert.h ../../pikotools/src/convert/inttostr.cpp ../../pikotools/src/convert/inttostr.h ../../pikotools/src/convert/misc.cpp ../../pikotools/src/convert/misc.h ../../pikotools/src/convert/patternreplacer.h ../../pikotools/src/convert/strtoint.h ../../pikotools/src/convert/text.cpp ../../pikotools/src/convert/text.h ../../pikotools/src/convert/text_private.h ../../pikotools/src/convert/double.cpp ../../pikotools/src/convert/double.h ../../pikotools/src/convert/baseparser.h ../../pikotools/src/convert/baseparser.cpp ../../pikotools/src/date/date.cpp ../../pikotools/src/date/date.h ../../pikotools/src/log/filelog.cpp ../../pikotools/src/log/filelog.h ../../pikotools/src/log/log.cpp ../../pikotools/src/log/log.h ../../pikotools/src/membuffer/membuffer.h ../../pikotools/src/space/space.cpp ../../pikotools/src/space/space.h ../../pikotools/src/space/spaceparser.cpp ../../pikotools/src/space/spaceparser.h ../../pikotools/src/textstream/textstream.h ../../pikotools/src/textstream/types.h ../../pikotools/src/textstream/stream.h ../../pikotools/src/utf8/utf8.cpp ../../pikotools/src/utf8/utf8.h ../../pikotools/src/utf8/utf8_private.cpp ../../pikotools/src/utf8/utf8_private.h ../../pikotools/src/utf8/utf8_templates.h ../../pikotools/src/utf8/utf8_stream.h ../../pikotools/src/csv/csvparser.cpp ../../pikotools/src/csv/csvparser.h ../../pikotools/src/mainoptions/mainoptionsparser.cpp ../../pikotools/src/mainoptions/mainoptionsparser.h ../../pikotools/src/html/htmlparser.cpp ../../pikotools/src/html/htmlparser.h ../../pikotools/src/html/bbcodeparser.h ../../pikotools/src/html/bbcodeparser.cpp ../../morm/src/baseexpression.cpp ../../morm/src/baseexpression.h ../../morm/src/clearer.cpp ../../morm/src/clearer.h ../../morm/src/cursor.h ../../morm/src/cursorhelper.h ../../morm/src/dbconnector.cpp ../../morm/src/dbconnector.h ../../morm/src/dbexpression.cpp ../../morm/src/dbexpression.h ../../morm/src/fieldvaluehelper.h ../../morm/src/finder.h ../../morm/src/finderhelper.h ../../morm/src/flatconnector.cpp ../../morm/src/flatconnector.h ../../morm/src/flatexpression.cpp ../../morm/src/flatexpression.h ../../morm/src/jsonconnector.cpp ../../morm/src/jsonconnector.h ../../morm/src/jsonexpression.cpp ../../morm/src/jsonexpression.h ../../morm/src/model.cpp ../../morm/src/model.h ../../morm/src/modelconnector.cpp ../../morm/src/modelconnector.h ../../morm/src/modeldata.h ../../morm/src/modelenv.h ../../morm/src/morm.h ../../morm/src/morm_types.h ../../morm/src/outstream.h ../../morm/src/postgresqlconnector.cpp ../../morm/src/postgresqlconnector.h ../../morm/src/postgresqlexpression.cpp ../../morm/src/postgresqlexpression.h ../../morm/src/postgresqlqueryresult.cpp ../../morm/src/postgresqlqueryresult.h ../../morm/src/queryresult.cpp ../../morm/src/queryresult.h ../../morm/src/ft.h ../../morm/src/baseobjectwrapper.h ../../morm/src/modelcontainerwrapper.h ../../morm/src/spacewrapper.h ../../morm/src/wrapper.h \ No newline at end of file +winix.src.files = ./core/config.cpp ./core/config.h ./core/acceptbaseparser.cpp ./core/acceptbaseparser.h ./core/acceptencodingparser.h ./core/app.cpp ./core/app.h ./core/basethread.cpp ./core/basethread.h ./core/compress.cpp ./core/compress.h ./core/cookieparser.h ./core/crypt.cpp ./core/crypt.h ./core/cur.h ./core/dircontainer.cpp ./core/dircontainer.h ./core/dirs.cpp ./core/dirs.h ./core/error.h ./core/filelog.cpp ./core/filelog.h ./core/groups.cpp ./core/groups.h ./core/httpsimpleparser.cpp ./core/httpsimpleparser.h ./core/image.cpp ./core/image.h ./core/ipban.h ./core/ipbancontainer.cpp ./core/ipbancontainer.h ./core/job.cpp ./core/job.h ./core/lastcontainer.cpp ./core/lastcontainer.h ./core/loadavg.cpp ./core/loadavg.h ./core/lock.h ./core/lock.cpp ./core/log.cpp ./core/log.h ./core/logmanipulators.h ./core/misc.cpp ./core/misc.h ./core/mount.cpp ./core/mount.h ./core/mountparser.cpp ./core/mountparser.h ./core/mounts.cpp ./core/mounts.h ./core/plugin.cpp ./core/plugin.h ./core/plugindata.cpp ./core/plugindata.h ./core/pluginmsg.h ./core/postmultiparser.cpp ./core/postmultiparser.h ./core/postparser.h ./core/rebus.cpp ./core/rebus.h ./core/request.cpp ./core/request.h ./core/requesttypes.h ./core/run.cpp ./core/run.h ./core/session.cpp ./core/session.h ./core/sessioncontainer.cpp ./core/sessioncontainer.h ./core/sessionidmanager.cpp ./core/sessionidmanager.h ./core/sessionmanager.cpp ./core/sessionmanager.h ./core/sessionparser.cpp ./core/sessionparser.h ./core/slog.cpp ./core/slog.h ./core/synchro.cpp ./core/synchro.h ./core/system.cpp ./core/system.h ./core/textstream.h ./core/threadmanager.cpp ./core/timezone.h ./core/threadmanager.h ./core/timezone.cpp ./core/timezones.cpp ./core/timezones.h ./core/ugcontainer.h ./core/users.cpp ./core/users.h ./core/version.h ./core/winix_const.h ./core/winixbase.cpp ./core/winixbase.h ./core/winixrequest.cpp ./core/winixrequest.h ./core/winixsystem.cpp ./core/winixsystem.h ./core/winixmodeldeprecated.h ./core/winixmodeldeprecated.cpp ./core/header.h ./core/acceptparser.h ./db/db.cpp ./db/db.h ./db/dbbase.cpp ./db/dbbase.h ./db/dbconn.cpp ./db/dbconn.h ./db/dbtextstream.cpp ./db/dbtextstream.h ./functions/account.cpp ./functions/account.h ./functions/adduser.cpp ./functions/adduser.h ./functions/cat.cpp ./functions/cat.h ./functions/chmod.cpp ./functions/chmod.h ./functions/chown.cpp ./functions/chown.h ./functions/ckeditor.cpp ./functions/ckeditor.h ./functions/cp.cpp ./functions/cp.h ./functions/default.cpp ./functions/default.h ./functions/download.cpp ./functions/download.h ./functions/emacs.cpp ./functions/emacs.h ./functions/env.cpp ./functions/env.h ./functions/functionbase.cpp ./functions/functionbase.h ./functions/functionparser.cpp ./functions/functionparser.h ./functions/functions.cpp ./functions/functions.h ./functions/imgcrop.cpp ./functions/imgcrop.h ./functions/ipban.cpp ./functions/ipban.h ./functions/last.cpp ./functions/last.h ./functions/ln.cpp ./functions/ln.h ./functions/locale.cpp ./functions/locale.h ./functions/login.cpp ./functions/login.h ./functions/logout.cpp ./functions/logout.h ./functions/ls.cpp ./functions/ls.h ./functions/man.cpp ./functions/man.h ./functions/meta.cpp ./functions/meta.h ./functions/mkdir.cpp ./functions/mkdir.h ./functions/mount.cpp ./functions/mount.h ./functions/mv.cpp ./functions/mv.h ./functions/nicedit.cpp ./functions/nicedit.h ./functions/node.cpp ./functions/node.h ./functions/passwd.cpp ./functions/passwd.h ./functions/priv.cpp ./functions/priv.h ./functions/privchanger.cpp ./functions/privchanger.h ./functions/pw.cpp ./functions/pw.h ./functions/reload.cpp ./functions/reload.h ./functions/rm.cpp ./functions/rm.h ./functions/rmuser.cpp ./functions/rmuser.h ./functions/run.cpp ./functions/run.h ./functions/sort.cpp ./functions/sort.h ./functions/specialdefault.cpp ./functions/specialdefault.h ./functions/stat.cpp ./functions/stat.h ./functions/subject.cpp ./functions/subject.h ./functions/template.cpp ./functions/template.h ./functions/timezone.cpp ./functions/timezone.h ./functions/tinymce.cpp ./functions/tinymce.h ./functions/uname.cpp ./functions/uname.h ./functions/upload.cpp ./functions/upload.h ./functions/uptime.cpp ./functions/uptime.h ./functions/vim.cpp ./functions/vim.h ./functions/who.cpp ./functions/who.h ./main/main.cpp ./models/group.cpp ./models/group.h ./models/item.cpp ./models/item.h ./models/itemcontent.cpp ./models/itemcontent.h ./models/migration.cpp ./models/migration.h ./models/user.cpp ./models/user.h ./models/winixmodel.h ./models/winixmodelconnector.h ./models/winixmodel.cpp ./models/winixmodelconnector.cpp ./models/userwrapper.h ./notify/notify.cpp ./notify/notify.h ./notify/notifypool.cpp ./notify/notifypool.h ./notify/notifythread.cpp ./notify/notifythread.h ./notify/templatesnotify.cpp ./notify/templatesnotify.h ./plugins/export/edb.cpp ./plugins/export/edb.h ./plugins/export/export.h ./plugins/export/exportinfo.cpp ./plugins/export/exportinfo.h ./plugins/export/exportthread.cpp ./plugins/export/exportthread.h ./plugins/export/funexport.cpp ./plugins/export/funexport.h ./plugins/export/init.cpp ./plugins/export/message.h ./plugins/gallery/gallery.cpp ./plugins/gallery/gallery.h ./plugins/gallery/galleryinfo.cpp ./plugins/gallery/galleryinfo.h ./plugins/gallery/init.cpp ./plugins/gallery/templates.cpp ./plugins/group/groupinfo.cpp ./plugins/group/groupinfo.h ./plugins/group/groups.cpp ./plugins/group/groups.h ./plugins/group/init.cpp ./plugins/group/templates.cpp ./plugins/mailregister/funregistermail.cpp ./plugins/mailregister/funregistermail.h ./plugins/mailregister/funregistermail_showusers.cpp ./plugins/mailregister/funregistermail_showusers.h ./plugins/mailregister/init.cpp ./plugins/mailregister/mdb.cpp ./plugins/mailregister/mdb.h ./plugins/mailregister/registermail_info.cpp ./plugins/mailregister/registermail_info.h ./plugins/mailregister/templates.cpp ./plugins/menu/cache.cpp ./plugins/menu/cache.h ./plugins/menu/init.cpp ./plugins/menu/templates.cpp ./plugins/seo/init.cpp ./plugins/seo/seo.cpp ./plugins/seo/seo.h ./plugins/stats/bot.cpp ./plugins/stats/bot.h ./plugins/stats/init.cpp ./plugins/stats/stats.cpp ./plugins/stats/stats.h ./plugins/stats/statssession.h ./plugins/stats/templates.cpp ./plugins/stats/templates.h ./plugins/thread/createthread.cpp ./plugins/thread/createthread.h ./plugins/thread/funthread.cpp ./plugins/thread/funthread.h ./plugins/thread/init.cpp ./plugins/thread/pluginmsg.h ./plugins/thread/reply.cpp ./plugins/thread/reply.h ./plugins/thread/showthreads.cpp ./plugins/thread/showthreads.h ./plugins/thread/tdb.cpp ./plugins/thread/tdb.h ./plugins/thread/templates.cpp ./plugins/thread/templates.h ./plugins/thread/thread.cpp ./plugins/thread/thread.h ./plugins/thread/threadfiles.cpp ./plugins/thread/threadfiles.h ./plugins/thread/threadinfo.cpp ./plugins/thread/threadinfo.h ./plugins/ticket/createticket.cpp ./plugins/ticket/createticket.h ./plugins/ticket/editticket.cpp ./plugins/ticket/editticket.h ./plugins/ticket/funticket.cpp ./plugins/ticket/funticket.h ./plugins/ticket/init.cpp ./plugins/ticket/pluginmsg.h ./plugins/ticket/sessiondata.cpp ./plugins/ticket/sessiondata.h ./plugins/ticket/showtickets.cpp ./plugins/ticket/showtickets.h ./plugins/ticket/tdb.cpp ./plugins/ticket/tdb.h ./plugins/ticket/templates.cpp ./plugins/ticket/ticket.h ./plugins/ticket/ticketinfo.cpp ./plugins/ticket/ticketinfo.h ./templates/adduser.cpp ./templates/antispam.cpp ./templates/changepatterns.cpp ./templates/changepatterns.h ./templates/config.cpp ./templates/currentdate.cpp ./templates/dir.cpp ./templates/doc.cpp ./templates/misc.h ./templates/filters.cpp ./templates/generic.cpp ./templates/htmltextstream.cpp ./templates/htmltextstream.h ./templates/indexpatterns.cpp ./templates/indexpatterns.h ./templates/insert.cpp ./templates/ipban.cpp ./templates/locale.cpp ./templates/last.cpp ./templates/priv.cpp ./templates/locale.h ./templates/localefilter.cpp ./templates/localefilter.h ./templates/login.cpp ./templates/ls.cpp ./templates/man.cpp ./templates/misc.cpp ./templates/templates.cpp ./templates/templates.h ./templates/who.cpp ./templates/mount.cpp ./templates/passwd.cpp ./templates/patterncacher.cpp ./templates/patterncacher.h ./templates/patterns.cpp ./templates/patterns.h ./templates/user.cpp ./templates/rebus.cpp ./templates/server.cpp ./templates/slog.cpp ./templates/stat.cpp ./templates/sys.cpp ./templates/template.cpp ./templates/winix.cpp ./templates/textextstream.cpp ./templates/textextstream.h ./templates/upload.cpp ./templates/uptime.cpp ../../ezc/src/blocks.cpp ../../ezc/src/blocks.h ../../ezc/src/cache.cpp ../../ezc/src/cache.h ../../ezc/src/expressionparser.h ../../ezc/src/ezc.h ../../ezc/src/functions.h ../../ezc/src/generator.h ../../ezc/src/item.cpp ../../ezc/src/item.h ../../ezc/src/objects.h ../../ezc/src/pattern.cpp ../../ezc/src/outstreams.h ../../ezc/src/funinfo.h ../../ezc/src/pattern.h ../../ezc/src/patternparser.cpp ../../ezc/src/patternparser.h ../../ezc/src/models.cpp ../../ezc/src/models.h ../../tito/src/aes.cpp ../../tito/src/aes.h ../../tito/src/base32.cpp ../../tito/src/base32.h ../../tito/src/base64.cpp ../../tito/src/base64.h ../../tito/src/crypto.cpp ../../tito/src/crypto.h ../../tito/src/misc.cpp ../../tito/src/misc.h ../../pikotools/src/convert/convert.h ../../pikotools/src/convert/inttostr.cpp ../../pikotools/src/convert/inttostr.h ../../pikotools/src/convert/misc.cpp ../../pikotools/src/convert/misc.h ../../pikotools/src/convert/patternreplacer.h ../../pikotools/src/convert/strtoint.h ../../pikotools/src/convert/text.cpp ../../pikotools/src/convert/text.h ../../pikotools/src/convert/text_private.h ../../pikotools/src/convert/double.h ../../pikotools/src/convert/double.cpp ../../pikotools/src/convert/baseparser.cpp ../../pikotools/src/convert/baseparser.h ../../pikotools/src/date/date.cpp ../../pikotools/src/date/date.h ../../pikotools/src/log/filelog.cpp ../../pikotools/src/log/filelog.h ../../pikotools/src/log/log.cpp ../../pikotools/src/log/log.h ../../pikotools/src/membuffer/membuffer.h ../../pikotools/src/space/space.cpp ../../pikotools/src/space/space.h ../../pikotools/src/space/spaceparser.cpp ../../pikotools/src/space/spaceparser.h ../../pikotools/src/textstream/textstream.h ../../pikotools/src/textstream/types.h ../../pikotools/src/textstream/stream.h ../../pikotools/src/utf8/utf8.cpp ../../pikotools/src/utf8/utf8.h ../../pikotools/src/utf8/utf8_private.cpp ../../pikotools/src/utf8/utf8_private.h ../../pikotools/src/utf8/utf8_templates.h ../../pikotools/src/utf8/utf8_stream.h ../../pikotools/src/html/bbcodeparser.cpp ../../pikotools/src/html/bbcodeparser.h ../../pikotools/src/html/htmlparser.cpp ../../pikotools/src/html/htmlparser.h ../../pikotools/src/csv/csvparser.cpp ../../pikotools/src/csv/csvparser.h ../../pikotools/src/mainoptions/mainoptionsparser.cpp ../../pikotools/src/mainoptions/mainoptionsparser.h ../../morm/src/outstream.h ../../morm/src/baseexpression.cpp ../../morm/src/baseexpression.h ../../morm/src/clearer.cpp ../../morm/src/clearer.h ../../morm/src/cursor.h ../../morm/src/cursorhelper.h ../../morm/src/dbconnector.cpp ../../morm/src/dbconnector.h ../../morm/src/dbexpression.cpp ../../morm/src/dbexpression.h ../../morm/src/fieldvaluehelper.h ../../morm/src/finder.h ../../morm/src/finderhelper.h ../../morm/src/flatconnector.cpp ../../morm/src/flatconnector.h ../../morm/src/flatexpression.cpp ../../morm/src/flatexpression.h ../../morm/src/jsonconnector.cpp ../../morm/src/jsonconnector.h ../../morm/src/jsonexpression.cpp ../../morm/src/jsonexpression.h ../../morm/src/model.cpp ../../morm/src/model.h ../../morm/src/modelconnector.cpp ../../morm/src/modelconnector.h ../../morm/src/modeldata.h ../../morm/src/modelenv.h ../../morm/src/morm.h ../../morm/src/morm_types.h ../../morm/src/postgresqlconnector.cpp ../../morm/src/postgresqlconnector.h ../../morm/src/postgresqlexpression.cpp ../../morm/src/postgresqlexpression.h ../../morm/src/postgresqlqueryresult.cpp ../../morm/src/postgresqlqueryresult.h ../../morm/src/queryresult.cpp ../../morm/src/queryresult.h ../../morm/src/ft.h ../../morm/src/baseobjectwrapper.h ../../morm/src/modelcontainerwrapper.h ../../morm/src/spacewrapper.h ../../morm/src/wrapper.h \ No newline at end of file diff --git a/winixd/core/Makefile.dep b/winixd/core/Makefile.dep index 9de095c..1472646 100644 --- a/winixd/core/Makefile.dep +++ b/winixd/core/Makefile.dep @@ -199,8 +199,8 @@ app.o: ../../../winix/winixd/templates/indexpatterns.h app.o: ../../../winix/winixd/templates/patterns.h app.o: ../../../winix/winixd/templates/changepatterns.h compress.h app.o: postparser.h httpsimpleparser.h cookieparser.h postmultiparser.h -app.o: acceptencodingparser.h acceptbaseparser.h winixrequest.h -app.o: ../../../winix/winixd/models/migration.h +app.o: acceptencodingparser.h acceptbaseparser.h acceptparser.h +app.o: winixrequest.h ../../../winix/winixd/models/migration.h basethread.o: basethread.h synchro.h winixmodeldeprecated.h basethread.o: ../../../winix/winixd/core/winixbase.h basethread.o: ../../../winix/winixd/core/config.h diff --git a/winixd/core/acceptparser.h b/winixd/core/acceptparser.h new file mode 100644 index 0000000..1e0e063 --- /dev/null +++ b/winixd/core/acceptparser.h @@ -0,0 +1,124 @@ +/* + * This file is a part of Winix + * and is distributed under the 2-Clause BSD licence. + * Author: Tomasz Sowa + */ + +/* + * Copyright (c) 2022, Tomasz Sowa + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef headerfile_winix_core_acceptparser +#define headerfile_winix_core_acceptparser + +#include "acceptbaseparser.h" +#include "log.h" +#include "header.h" + + +namespace Winix +{ + + + +class AcceptParser : public AcceptBaseParser +{ +public: + + static constexpr size_t MAX_CONTAINER_LENGTH = 16; + + /* + * IMPROVEME add support for something like "text/html;level=1" (skip the level part) + * + * https://developer.mozilla.org/en-US/docs/Glossary/Quality_values + * Some syntax, like the one of Accept, allow additional specifiers like text/html;level=1. + * These increase the specificity of the value. Their use is extremely rare. + * + * + */ + + void Parse(const wchar_t * str, std::vector & header_values, bool clear_header_values = true) + { + if( clear_header_values ) + header_values.clear(); + + this->header_values = &header_values; + AcceptBaseParser::Parse(str); + + std::sort(header_values.begin(), header_values.end(), [](HeaderValue & h1, HeaderValue & h2) -> bool { + return h1.weight > h2.weight; + }); + + PutToLog(header_values); + } + + + void Parse(const std::wstring & str, std::vector & header_values, bool clear_header_values = true) + { + Parse(str.c_str(), header_values, clear_header_values); + } + + +private: + + std::vector * header_values; + + void Param(const std::wstring & param, double q) + { + if( header_values->size() < MAX_CONTAINER_LENGTH && q > 0.0 ) + { + if( q > 1.0 ) + q = 1.0; + + header_values->resize(header_values->size() + 1); + header_values->back().value = param; + header_values->back().weight = q; + } + } + + void PutToLog(std::vector & header_values) + { + if( !header_values.empty() ) + { + log << log3 << "AP: " << Header::accept << " header consists of: "; + HeaderValue::log_values(header_values, log); + log << logend; + } + else + { + log << log3 << "AP: there is no " << Header::accept << " header" << logend; + } + } + +}; + + + +} // namespace Winix + + +#endif diff --git a/winixd/core/app.cpp b/winixd/core/app.cpp index 96e05c1..756715e 100644 --- a/winixd/core/app.cpp +++ b/winixd/core/app.cpp @@ -386,6 +386,7 @@ bool App::Init() cookie_parser.set_dependency(&winix_model); accept_encoding_parser.set_dependency(&winix_base); + accept_parser.set_dependency(&winix_base); plugin.Call((Session*)0, WINIX_PLUGIN_INIT); @@ -777,7 +778,7 @@ void App::SaveSessionsIfNeeded() // !! IMPROVE ME change to a better name -void App::MakeEzcGenerator() +void App::UseEzcGenerator() { // if( cur.request->page_generated || !cur.request->redirect_to.empty() || !cur.request->x_sendfile.empty() ) // return; @@ -823,23 +824,19 @@ void App::CheckPostRedirect() void App::AddDefaultModels() { - // there is no need to add default models if we return a binary stream - if( cur.request->answer_source != Request::AnswerSource::answer_bin_stream ) + if( cur.request->function && cur.request->function->register_default_models ) { - if( cur.request->function && cur.request->function->register_default_models ) + // may it would be better do not return cur.request by default? + cur.request->models.Add(L"request", cur.request); + + if( cur.session && cur.session->puser ) { - // may it would be better do not return cur.request by default? - cur.request->models.Add(L"request", cur.request); + cur.request->models.Add(L"user", *cur.session->puser); + } - if( cur.session && cur.session->puser ) - { - cur.request->models.Add(L"user", *cur.session->puser); - } - - if( cur.request->is_item ) - { - cur.request->models.Add(L"item", cur.request->item); - } + if( cur.request->is_item ) + { + cur.request->models.Add(L"item", cur.request->item); } } } @@ -857,8 +854,7 @@ void App::Make() return; } - if( !cur.request->PrepareAnswerType() ) - return; + cur.request->PrepareAnswerType(); if( cur.session->ip_ban && cur.session->ip_ban->IsIPBanned() ) { @@ -958,6 +954,7 @@ void App::ReadRequest() cookie_parser.Parse(cur.request->env_http_cookie, cur.request->cookie_tab); accept_encoding_parser.ParseAndLog(cur.request->env_http_accept_encoding); + accept_parser.Parse(cur.request->env_http_accept, cur.request->accept_mime_types); if( config.log_env_variables ) LogEnvironmentVariables(); @@ -987,7 +984,9 @@ void App::SetEnv(const char * name, std::wstring & env) - +/* + * IMPROVE ME take it from cur.request.headers_in? + */ void App::ReadEnvVariables() { SetEnv("REQUEST_METHOD", cur.request->env_request_method); @@ -1000,6 +999,7 @@ void App::ReadEnvVariables() SetEnv("HTTP_USER_AGENT", cur.request->env_http_user_agent); SetEnv("HTTP_COOKIE", cur.request->env_http_cookie); SetEnv("HTTP_ACCEPT_ENCODING", cur.request->env_http_accept_encoding); + SetEnv("HTTP_ACCEPT", cur.request->env_http_accept); } @@ -1116,7 +1116,6 @@ void App::ReadEnvRemoteIP() - void App::CheckRequestMethod() { cur.request->method = Request::unknown_method; @@ -1432,28 +1431,28 @@ void App::PrepareHeaderContentType() { if( !cur.request->out_headers.has_key(Winix::Header::content_type) ) { - if( cur.request->answer_source == Request::AnswerSource::answer_bin_stream ) + if( cur.request->container_type == Request::ContainerType::container_json ) { - cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::application_octet_stream); + cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::application_json_utf8); } else + if( cur.request->container_type == Request::ContainerType::container_xml ) { - if( cur.request->answer_container == Request::AnswerContainer::answer_json ) + cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::application_xml_utf8); + } + else + if( cur.request->container_type == Request::ContainerType::container_csv ) + { + cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::text_csv_utf8); + } + else + if( cur.request->container_type == Request::ContainerType::container_raw ) + { + if( cur.request->send_bin_stream ) { - cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::application_json_utf8); + cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::application_octet_stream); } else - if( cur.request->answer_container == Request::AnswerContainer::answer_xml ) - { - cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::application_xml_utf8); - } - else - if( cur.request->answer_container == Request::AnswerContainer::answer_csv ) - { - cur.request->out_headers.add(Winix::Header::content_type, Winix::Header::text_csv_utf8); - } - else - if( cur.request->answer_container == Request::AnswerContainer::answer_text ) { switch( config.content_type_header ) { @@ -1828,83 +1827,167 @@ void App::SendAnswer() // what about method HEAD? if( !cur.request->redirect_to.empty() || !cur.request->x_sendfile.empty() ) { - Send8bitOutput(output_8bit); + Send8bitOutput(output_8bit); // send empty content return; } - if( cur.request->answer_source == Request::AnswerSource::answer_bin_stream ) + plugin.Call(WINIX_CONTENT_MAKE); + + if( cur.request->use_ezc_engine ) + { + UseEzcGenerator(); + } + + if( cur.request->container_type == Request::ContainerType::container_raw ) + { + PrepareRawAnswer(); + } + else + if( cur.request->container_type == Request::ContainerType::container_json ) + { + PrepareJsonAnswer(); + } + else + if( cur.request->container_type == Request::ContainerType::container_xml ) + { + PrepareXmlAnswer(); + } + else + if( cur.request->container_type == Request::ContainerType::container_csv ) + { + PrepareCsvAnswer(); + } + + Send8bitOutput(output_8bit); +} + + +void App::PrepareRawAnswer() +{ + if( cur.request->send_bin_stream ) { Send8bitOutput(cur.request->out_bin_stream); } else + if( cur.request->send_main_stream ) { - // is this plugin call correct here? - plugin.Call(WINIX_CONTENT_MAKE); - - if( cur.request->answer_source == Request::AnswerSource::answer_models && cur.request->use_ezc_engine ) - { - MakeEzcGenerator(); // give me a better name - - if( !cur.request->frame.empty() || cur.request->send_all_frames ) - { - cur.request->answer_source = Request::AnswerSource::answer_frame_streams; - } - else - { - cur.request->answer_source = Request::AnswerSource::answer_main_stream; - } - } - - if( cur.request->answer_source == Request::AnswerSource::answer_main_stream ) - { - const wchar_t * field_name = nullptr; - - if( cur.request->answer_container == Request::AnswerContainer::answer_xml ) - field_name = config.xml_root.c_str(); - - SerializeStream(cur.request->out_main_stream.get_buffer(), field_name); - } - else - if( cur.request->answer_source == Request::AnswerSource::answer_frame_streams ) - { - SerializeFrames(); - } - else - if( cur.request->answer_source == Request::AnswerSource::answer_models ) - { - SerializeModels(); - } - - Send8bitOutput(output_8bit); + FilterHtmlIfNeeded(cur.request->out_main_stream.get_buffer(), output_8bit, false); + } + else + if( cur.request->send_all_frames ) + { + SerializeAllFrames(); + } + else + if( !cur.request->send_frames.empty() ) + { + SerializeSpecificFrames(); } } - -void App::SerializeStream(const pt::WTextStream & input_stream, const wchar_t * field_name) +void App::PrepareJsonAnswer() { - switch( cur.request->answer_container ) + output_8bit << '{'; + PrepareContenerizedAnswer(); + output_8bit << '}'; +} + +void App::PrepareXmlAnswer() +{ + output_8bit << '<'; + pt::esc_to_xml(config.xml_root, output_8bit); + output_8bit << '>'; + + PrepareContenerizedAnswer(); + + output_8bit << "'; +} + + +void App::PrepareCsvAnswer() +{ + PrepareContenerizedAnswer(); +} + + +void App::PrepareContenerizedAnswer() +{ + bool put_separator = false; + + if( cur.request->serialize_models ) { - case Request::AnswerContainer::answer_json: - SerializeStreamJson(input_stream, field_name); - break; + SerializeModels(); + put_separator = true; + } - case Request::AnswerContainer::answer_xml: - SerializeStreamXml(input_stream, field_name); - break; + if( cur.request->send_bin_stream ) + { + PutSeparatorIfNeeded(put_separator); - case Request::AnswerContainer::answer_csv: - SerializeStreamCsv(input_stream, field_name); - break; + // IMPLEMENT ME serialize binary stream as base64 and put in 'bin_stream' field + pt::WTextStream str; + str << "NOT IMPLEMENTED YET"; + SerializeStream(str, config.bin_stream_field.c_str()); + put_separator = true; + } - case Request::AnswerContainer::answer_text: - default: - FilterHtmlIfNeeded(input_stream, output_8bit); - break; + if( cur.request->send_main_stream ) + { + PutSeparatorIfNeeded(put_separator); + SerializeStream(cur.request->out_main_stream.get_buffer(), config.main_stream_field.c_str()); + put_separator = true; + } + + if( cur.request->send_all_frames || !cur.request->send_frames.empty() ) + { + PutSeparatorIfNeeded(put_separator); + SerializeFieldJson(config.ezc_frames_field.c_str()); + output_8bit << "{"; + + if( cur.request->send_all_frames ) + { + SerializeAllFrames(); + } + else + if( !cur.request->send_frames.empty() ) + { + SerializeSpecificFrames(); + } + + output_8bit << "}"; + put_separator = true; } } -void App::SerializeStreamJson(const pt::WTextStream & input_stream, const wchar_t * field_name) +void App::PutSeparatorIfNeeded(bool put_separator) +{ + if( put_separator ) + { + switch( cur.request->container_type ) + { + case Request::ContainerType::container_json: + output_8bit << ","; + break; + + case Request::ContainerType::container_xml: + break; + + case Request::ContainerType::container_csv: + output_8bit << ";"; + break; + + case Request::ContainerType::container_raw: + default: + break; + } + } +} + + +void App::SerializeFieldJson(const wchar_t * field_name) { if( field_name ) { @@ -1912,7 +1995,37 @@ void App::SerializeStreamJson(const pt::WTextStream & input_stream, const wchar_ pt::esc_to_json(field_name, output_8bit); output_8bit << "\":"; } +} + + +void App::SerializeStream(const pt::WTextStream & input_stream, const wchar_t * field_name) +{ + switch( cur.request->container_type ) + { + case Request::ContainerType::container_json: + SerializeStreamJson(input_stream, field_name); + break; + + case Request::ContainerType::container_xml: + SerializeStreamXml(input_stream, field_name); + break; + + case Request::ContainerType::container_csv: + SerializeStreamCsv(input_stream, field_name); + break; + + case Request::ContainerType::container_raw: + default: + FilterHtmlIfNeeded(input_stream, output_8bit, false); + break; + } +} + + +void App::SerializeStreamJson(const pt::WTextStream & input_stream, const wchar_t * field_name) +{ + SerializeFieldJson(field_name); output_8bit << '"'; if( config.html_filter && cur.request->use_html_filter ) @@ -1982,39 +2095,6 @@ void App::SerializeStreamCsv(const pt::WTextStream & input_stream, const wchar_t } -void App::SerializeFrames() -{ - if( cur.request->answer_container == Request::AnswerContainer::answer_json ) - { - output_8bit << '{'; - } - else - if( cur.request->answer_container == Request::AnswerContainer::answer_xml ) - { - output_8bit << '<'; - pt::esc_to_xml(config.xml_root, output_8bit); - output_8bit << '>'; - } - - if( cur.request->frame.empty() || cur.request->send_all_frames ) - SerializeAllFrames(); - else - SerializeOneFrame(); - - if( cur.request->answer_container == Request::AnswerContainer::answer_json ) - { - output_8bit << '}'; - } - else - if( cur.request->answer_container == Request::AnswerContainer::answer_xml ) - { - output_8bit << "'; - } -} - - void App::SerializeAllFrames() { auto i = cur.request->out_streams.streams_map.begin(); @@ -2022,12 +2102,12 @@ void App::SerializeAllFrames() for( ; i != cur.request->out_streams.streams_map.end() ; ++i) { - if( cur.request->answer_container == Request::AnswerContainer::answer_json && !is_first ) + if( cur.request->container_type == Request::ContainerType::container_json && !is_first ) { output_8bit << ','; } - if( cur.request->answer_container == Request::AnswerContainer::answer_xml && i->first.empty() ) + if( cur.request->container_type == Request::ContainerType::container_xml && i->first.empty() ) { log << log2 << "App: I cannot serialize a frame with an empty name to xml (frame skipped)" << logend; } @@ -2041,51 +2121,46 @@ void App::SerializeAllFrames() } -void App::SerializeOneFrame() +void App::SerializeSpecificFrames() { - auto i = cur.request->out_streams.streams_map.find(cur.request->frame); + bool is_first = true; - if( i != cur.request->out_streams.streams_map.end() ) + for(std::wstring & frame: cur.request->send_frames) { - SerializeStream(i->second->get_buffer(), cur.request->frame.c_str()); - } - else - { - log << log2 << "App: there is no such a frame: " << cur.request->frame << logend; - // return 404 in such a case? + auto i = cur.request->out_streams.streams_map.find(frame); + + if( i != cur.request->out_streams.streams_map.end() ) + { + if( cur.request->container_type == Request::ContainerType::container_json && !is_first ) + { + output_8bit << ','; + } + + SerializeStream(i->second->get_buffer(), frame.c_str()); + is_first = false; + } + else + { + log << log2 << "App: there is no such a frame: " << frame << logend; + } } } - void App::SerializeModels() { Ezc::Models::ModelsMap models_map = cur.request->models.GetMap(); auto i = models_map.begin(); - - if( cur.request->answer_container == Request::AnswerContainer::answer_json ) - { - output_8bit << '{'; - } - else - if( cur.request->answer_container == Request::AnswerContainer::answer_xml ) - { - output_8bit << '<'; - pt::esc_to_xml(config.xml_root, output_8bit); - output_8bit << '>'; - log << log2 << "App: serializing models to xml not implemented yet" << logend; - } - bool is_first = true; for( ; i != models_map.end() ; ++i) { - if( cur.request->answer_container == Request::AnswerContainer::answer_json && !is_first ) + if( cur.request->container_type == Request::ContainerType::container_json && !is_first ) { output_8bit << ','; } - if( cur.request->answer_container == Request::AnswerContainer::answer_xml && i->first.empty() ) + if( cur.request->container_type == Request::ContainerType::container_xml && i->first.empty() ) { log << log2 << "App: I cannot serialize a model with an empty name to xml (model skipped)" << logend; } @@ -2096,40 +2171,27 @@ void App::SerializeModels() is_first = false; } - - if( cur.request->answer_container == Request::AnswerContainer::answer_json ) - { - output_8bit << '}'; - } - else - if( cur.request->answer_container == Request::AnswerContainer::answer_xml ) - { - output_8bit << "'; - } } void App::SerializeModel(morm::Wrapper & wrapper, const wchar_t * field_name) { - switch( cur.request->answer_container ) + switch( cur.request->container_type ) { - case Request::AnswerContainer::answer_json: + case Request::ContainerType::container_json: SerializeModelJson(wrapper, field_name); break; - case Request::AnswerContainer::answer_xml: + case Request::ContainerType::container_xml: SerializeModelXml(wrapper, field_name); break; - case Request::AnswerContainer::answer_csv: + case Request::ContainerType::container_csv: SerializeModelCsv(wrapper, field_name); break; - case Request::AnswerContainer::answer_text: + case Request::ContainerType::container_raw: default: - SerializeModelCsv(wrapper, field_name); break; } } @@ -2137,12 +2199,7 @@ void App::SerializeModel(morm::Wrapper & wrapper, const wchar_t * field_name) void App::SerializeModelJson(morm::Wrapper & wrapper, const wchar_t * field_name) { - if( field_name ) - { - output_8bit << '"'; - pt::esc_to_json(field_name, output_8bit); - output_8bit << "\":"; - } + SerializeFieldJson(field_name); if( wrapper.model ) { diff --git a/winixd/core/app.h b/winixd/core/app.h index c1131d3..98e4691 100644 --- a/winixd/core/app.h +++ b/winixd/core/app.h @@ -54,6 +54,7 @@ #include "cookieparser.h" #include "postmultiparser.h" #include "acceptencodingparser.h" +#include "acceptparser.h" #include "winixrequest.h" #include "log/log.h" #include "filelog.h" @@ -140,6 +141,7 @@ private: CookieParser cookie_parser; AcceptEncodingParser accept_encoding_parser; + AcceptParser accept_parser; Compress compress; FCGX_Request fcgi_request; int fcgi_socket; @@ -199,7 +201,7 @@ private: void CheckIfNeedSSLredirect(); void SetLocale(); void CheckPostRedirect(); - void MakeEzcGenerator(); + void UseEzcGenerator(); void AddDefaultModels(); void Make(); void SaveSessionsIfNeeded(); // !! IMPROVE ME wywalic do menagera sesji?? @@ -207,14 +209,24 @@ private: void SendData(const BinaryPage & page, FCGX_Stream * out); void ReadRequest(); + void SendAnswer(); + void PrepareRawAnswer(); + void PrepareJsonAnswer(); + void PrepareXmlAnswer(); + void PrepareCsvAnswer(); + void PrepareContenerizedAnswer(); + + void PutSeparatorIfNeeded(bool put_separator); + + void SerializeFieldJson(const wchar_t * field_name); + void SerializeStream(const pt::WTextStream & input_stream, const wchar_t * field_name); void SerializeStreamJson(const pt::WTextStream & input_stream, const wchar_t * field_name); void SerializeStreamXml(const pt::WTextStream & input_stream, const wchar_t * field_name); void SerializeStreamCsv(const pt::WTextStream & input_stream, const wchar_t * field_name); - void SerializeFrames(); void SerializeAllFrames(); - void SerializeOneFrame(); + void SerializeSpecificFrames(); void SerializeModels(); void Send8bitOutput(BinaryPage & output); diff --git a/winixd/core/config.cpp b/winixd/core/config.cpp index d3a28d6..77defce 100644 --- a/winixd/core/config.cpp +++ b/winixd/core/config.cpp @@ -284,10 +284,17 @@ void Config::AssignValues(bool stdout_is_closed) ezc_max_elements = Size(L"ezc_max_elements", 50000); ezc_max_loop_elements = Size(L"ezc_max_loop_elements", 5000); ezc_out_streams_size = Size(L"ezc_out_streams_size", 128); - request_frame_parameter = Text(L"request_frame_parameter", L"frame"); - request_all_frames_parameter = Text(L"request_all_frames_parameter", L"allframes"); + request_frame_parameter = Text(L"request_frame_parameter", L"frame"); + request_all_frames_parameter = Text(L"request_all_frames_parameter", L"all_frames"); + request_main_stream_parameter = Text(L"request_main_stream_parameter", L"main_stream"); + + request_frame_parameter_max_length = Size(L"request_frame_parameter_max_length", 128); + request_frame_parameter_max_frames = Size(L"request_frame_parameter_max_frames", 16); xml_root = Text(L"xml_root", L"winix"); + bin_stream_field = Text(L"bin_stream_field", L"bin_stream"); + main_stream_field = Text(L"main_stream_field", L"main_stream"); + ezc_frames_field = Text(L"ezc_frames_field", L"ezc_frames"); account_need_email_verification = Bool(L"account_need_email_verification", true); reset_password_code_expiration_time = Long(L"reset_password_code_expiration_time", 86400); diff --git a/winixd/core/config.h b/winixd/core/config.h index 9716f9a..3680505 100644 --- a/winixd/core/config.h +++ b/winixd/core/config.h @@ -676,15 +676,40 @@ public: // default: frame std::wstring request_frame_parameter; - // the name of the url parameter for returning all frames, e.g. https://domain.tld/mydir/myfunction/allframes - // default: allframes + // the name of the url parameter for returning all frames, e.g. https://domain.tld/mydir/myfunction/all_frames + // default: all_frames std::wstring request_all_frames_parameter; + // the name of the url parameter for returning the main ezc stream, e.g. https://domain.tld/mydir/myfunction/main_stream + // default: main_stream + std::wstring request_main_stream_parameter; + + // max lenght of the url frame parameter + // default: 128 + size_t request_frame_parameter_max_length; + + // max number of frames in the frame url parameter (they are separated by a comma) + // default: 16 + // if you need more frames you can use all_frames url parameter to return all frames + size_t request_frame_parameter_max_frames; + // the name of the root element when serializing request answer to xml // default: winix std::wstring xml_root; - // when true then when a user want to create a new account + // the name of the field of the binary stream when serializing a request + // default: bin_stream + std::wstring bin_stream_field; + + // the name of the field of the main ezc stream when serializing a request + // default: main_stream + std::wstring main_stream_field; + + // the name of the field (object) of the ezc frames when serializing a request + // default: ezc_frames + std::wstring ezc_frames_field; + + // when true then when a user want to create a new account // he has to provide his email and a message will be sent back to him // with a link to activate the account // default: true diff --git a/winixd/core/header.h b/winixd/core/header.h index 63c8a4e..ae4da11 100644 --- a/winixd/core/header.h +++ b/winixd/core/header.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2021, Tomasz Sowa + * Copyright (c) 2021-2022, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,6 +35,8 @@ #ifndef headerfile_winix_core_header #define headerfile_winix_core_header +#include "log.h" + namespace Winix { @@ -47,7 +49,13 @@ public: * headers' names */ static constexpr const wchar_t * content_type = L"Content-Type"; + static constexpr const wchar_t * accept = L"Accept"; + /* + * headers' names lower case + */ + static constexpr const wchar_t * content_type_lc = L"content-type"; + static constexpr const wchar_t * accept_lc = L"accept"; /* * headers' values @@ -61,6 +69,10 @@ public: static constexpr const wchar_t * text_csv = L"text/csv"; static constexpr const wchar_t * text_javascript = L"text/javascript"; + static constexpr const wchar_t * all_all = L"*/*"; + static constexpr const wchar_t * text_all = L"text/*"; + static constexpr const wchar_t * application_all = L"application/*"; + static constexpr const wchar_t * text_html_utf8 = L"text/html; charset=UTF-8"; static constexpr const wchar_t * application_json_utf8 = L"application/json; charset=UTF-8"; static constexpr const wchar_t * application_xml_utf8 = L"application/xml; charset=UTF-8"; @@ -68,6 +80,41 @@ public: static constexpr const wchar_t * text_csv_utf8 = L"text/csv; charset=UTF-8"; static constexpr const wchar_t * text_javascript_utf8 = L"text/javascript; charset=UTF-8"; + +}; + + +class HeaderValue +{ +public: + + std::wstring value; + double weight; // q parameter in some headers + + + HeaderValue() + { + weight = 0.0; + } + + + static void log_values(const std::vector & header_values, Log & log) + { + char buf[64]; + bool is_first = true; + + for(const HeaderValue & h: header_values) + { + snprintf(buf, sizeof(buf)/sizeof(char), "%.3f", h.weight); + + if( !is_first ) + log << ", "; + + log << h.value << ";q=" << buf; + is_first = false; + } + } + }; } diff --git a/winixd/core/misc.cpp b/winixd/core/misc.cpp index ae62a92..bbb7a89 100644 --- a/winixd/core/misc.cpp +++ b/winixd/core/misc.cpp @@ -1601,5 +1601,36 @@ void timespec_to_stream_with_unit(timespec & val, pt::Stream & stream) } +void slice_by(const std::wstring & str, wchar_t c, std::vector & out) +{ + std::wstring tmp; + + for(size_t i = 0 ; i < str.size() ; ++i) + { + if( str[i] == c ) + { + if( !tmp.empty() ) + { + out.push_back(tmp); + tmp.clear(); + } + } + else + { + tmp += str[i]; + } + } + + if( !tmp.empty() ) + { + out.push_back(tmp); + } +} + + + + + + } // namespace Winix diff --git a/winixd/core/misc.h b/winixd/core/misc.h index 495977f..f20f177 100644 --- a/winixd/core/misc.h +++ b/winixd/core/misc.h @@ -1029,6 +1029,8 @@ void timespec_to_stream(timespec & val, pt::Stream & stream); void timespec_to_stream_with_unit(timespec & val, pt::Stream & stream); +void slice_by(const std::wstring & str, wchar_t c, std::vector & out); + } // namespace Winix diff --git a/winixd/core/request.cpp b/winixd/core/request.cpp index c25cbd9..ae1e8be 100644 --- a/winixd/core/request.cpp +++ b/winixd/core/request.cpp @@ -120,6 +120,7 @@ void Request::Clear() env_http_host.clear(); env_http_user_agent.clear(); env_http_accept_encoding.clear(); + env_http_accept.clear(); env_fcgi_role.clear(); env_content_type.clear(); env_https.clear(); @@ -134,11 +135,16 @@ void Request::Clear() param_tab.clear(); anchor.clear(); - answer_source = AnswerSource::answer_models; - answer_container = AnswerContainer::answer_text; - use_ezc_engine = true; - frame.clear(); + send_bin_stream = false; + send_main_stream = false; send_all_frames = false; + send_frames.clear(); + + use_ezc_engine = false; + serialize_models = false; + + accept_mime_types.clear(); + container_type = ContainerType::container_raw; status = WINIX_ERR_OK; @@ -206,30 +212,81 @@ void Request::RequestEnds() -bool Request::PrepareAnswerType() +void Request::PrepareAnswerType() { - answer_source = AnswerSource::answer_models; - answer_container = AnswerContainer::answer_text; - use_ezc_engine = true; + CheckAcceptHeader(); + CheckContainerParameter(); - frame = ParamValue(config->request_frame_parameter); + serialize_models = (container_type != ContainerType::container_raw); send_all_frames = (ParamValuep(config->request_all_frames_parameter) != nullptr); + send_main_stream = (ParamValuep(config->request_main_stream_parameter) != nullptr); use_html_filter = config->html_filter; + PrepareFrameNames(); - bool ok = true; + if( container_type == ContainerType::container_raw && !send_all_frames && send_frames.empty() ) + { + send_main_stream = true; + } - // IMPLEMENT ME add checking for Accept header; - - ok = ok && CheckContainerParameter(); - ok = ok && CheckAnswerParameter(); - - - return ok; + use_ezc_engine = send_main_stream || send_all_frames || !send_frames.empty(); } -// IMPROVE ME give me a better name -bool Request::CheckContainerParameter() +void Request::CheckAcceptHeader() +{ + if( !accept_mime_types.empty() ) + { + bool found = false; + + for(HeaderValue & h: accept_mime_types) + { + if( h.value == Header::text_html || h.value == Header::application_xhtml_xml || + h.value == Header::text_all || h.value == Header::all_all) + { + container_type = ContainerType::container_raw; + found = true; + break; + } + else + if( h.value == Header::application_json || h.value == Header::application_all ) + { + container_type = ContainerType::container_json; + found = true; + break; + } + else + if( h.value == Header::application_xml ) + { + container_type = ContainerType::container_xml; + found = true; + break; + } + else + if( h.value == Header::text_csv ) + { + container_type = ContainerType::container_csv; + found = true; + break; + } + } + + if( !found ) + { + Log * log = get_logger(); + + if( log ) + { + (*log) << log2 << "App: an unknown " << Header::accept << " headers: "; + HeaderValue::log_values(accept_mime_types, *log); + (*log) << " (skipping)" << logend; + } + } + } +} + + + +void Request::CheckContainerParameter() { std::wstring * container = ParamValuep(L"container"); @@ -238,24 +295,24 @@ bool Request::CheckContainerParameter() // IMPROVEME do a plugin call here // if a plugin can consume this then don't check text/json/xml/csv and just return true - if( *container == L"text" ) + if( *container == L"raw" ) { - answer_container = Request::AnswerContainer::answer_text; + container_type = ContainerType::container_raw; } else if( *container == L"json" ) { - answer_container = Request::AnswerContainer::answer_json; + container_type = ContainerType::container_json; } else if( *container == L"xml" ) { - answer_container = Request::AnswerContainer::answer_xml; + container_type = ContainerType::container_xml; } else if( *container == L"csv" ) { - answer_container = Request::AnswerContainer::answer_csv; + container_type = ContainerType::container_csv; } else { @@ -263,50 +320,43 @@ bool Request::CheckContainerParameter() if( log ) { - (*log) << log2 << "App: an unknown 'container' parameter: " << *container << logend; - // IMPROVE ME set status to 404 - return false; + (*log) << log2 << "App: an unknown container url parameter: " << *container << " (skipping)" << logend; } } } - - return true; } -// IMPROVE ME give me a better name -bool Request::CheckAnswerParameter() +void Request::PrepareFrameNames() { - std::wstring * answer = ParamValuep(L"answer"); + Config * config = get_config(); + Log * log = get_logger(); - if( answer ) + if( config && log ) { - // IMPROVEME do a plugin call here - // if a plugin can consume this then don't check html/data and just return true + const std::wstring & frame = ParamValue(config->request_frame_parameter); - if( *answer == L"html" ) + if( frame.size() <= config->request_frame_parameter_max_length ) { - use_ezc_engine = true; - } - else - if( *answer == L"data" ) - { - use_ezc_engine = false; - } - else - { - Log * log = get_logger(); + send_frames.clear(); + slice_by(frame, ',', send_frames); + std::sort(send_frames.begin(), send_frames.end()); + auto frames_end = std::unique(send_frames.begin(), send_frames.end()); + send_frames.erase(frames_end, send_frames.end()); - if( log ) + if( send_frames.size() > config->request_frame_parameter_max_frames ) { - (*log) << log2 << "App: an unknown 'answer' parameter: " << *answer << logend; - // IMPROVE ME set status to 404 - return false; + send_frames.clear(); + (*log) << log2 << "Request: the number of frames exceeds " << config->request_frame_parameter_max_frames + << " (skipping frames)" << logend; } } + else + { + (*log) << log2 << "Request: the length of the frame url parameter exceeds " << config->request_frame_parameter_max_length + << " characters (skiping frames)" << logend; + } } - - return true; } @@ -504,6 +554,31 @@ void Request::last_item_wrapper(morm::Wrapper & wrapper) } +bool Request::has_frame(const wchar_t * frame) +{ + for(std::wstring & f: send_frames) + { + if( f == frame ) + return true; + } + + return false; +} + + +bool Request::has_frame(const std::wstring & frame) +{ + for(std::wstring & f: send_frames) + { + if( f == frame ) + return true; + } + + return false; +} + + + } // namespace Winix diff --git a/winixd/core/request.h b/winixd/core/request.h index 9eb9392..c7c9b78 100644 --- a/winixd/core/request.h +++ b/winixd/core/request.h @@ -190,6 +190,7 @@ public: std::wstring env_http_host; std::wstring env_http_user_agent; std::wstring env_http_accept_encoding; + std::wstring env_http_accept; std::wstring env_fcgi_role; std::wstring env_content_type; std::wstring env_https; @@ -249,180 +250,87 @@ public: * */ - // the algorithm how a request's answer is created - // ------------------------------------------------------------------------------------------ // - // at the beginning of a request winix sets - // answer_source to models - // answer_container to text - // use_ezc_engine to true + // the algorithm how a request's container is selected is shown below: + // (the whole answer's algorightm is implemented in PrepareAnswerType() method) + // ------------------------------------------------------------------------------------------ // - // next answer_container and use_ezc_engine can be changed in the following way: + // at the beginning we set container_type to "raw" meaning simple text or html, then + // we check the "Accept" http header, if it is set then we set container_type accordingly: // - // 1. winix will look for 'Accept' http header and depending on the header winix will set: + // Accept | container_type + // ----------------------------------------------- + // text/html | container_raw + // application/xhtml+xml | container_raw + // application/json | container_json + // application/xml | container_xml + // text/csv | container_csv // - // Accept | answer_container | use_ezc_engine - // ------------------------------------|----------------- - // application/json | json | false - // application/xml | xml | false - // text/csv | csv | false + // next we check "container" url parameter, if it is set then we set container_type accordingly + // ("container" url parameter has higher precedence than "Accept" http header): + // + // container | container_type + // ----------------------------------------------- + // raw | container_raw + // json | container_json + // xml | container_xml + // csv | container_csv // // + // Samples: // - // 2. next answer_container is set depending on 'container' url parameter - // container | answer_container - // --------------------------------------------------------- - // not present | don't change the value - // text | text - // json | json - // xml | xml - // csv | csv + // http://domain.tld/dir/controller + // returns html answer from the main ezc stream // - // use_ezc_engine is set depending on 'answer' url parameter: - // answer | use_ezc_engine - // --------------------------------- - // not present | don't change the value - // html | true - // data | false + // http://domain.tld/dir/controller/container:raw + // returns html answer from the main ezc stream (the same as above) // - // if 'answer' is html then we take into account two more parameters: - // frame: frame_name (empty default) - if set then winix returns this specific frame - // allframes: (if present then winix returns all frames) + // http://domain.tld/dir/controller/frame:abc + // returns "abc" frame as html // + // http://domain.tld/dir/controller/container:json + // returns all serialized models to json and no ezc streams // + // http://domain.tld/dir/controller/container:xml + // returns all serialized models to xml and no ezc streams // + // http://domain.tld/dir/controller/container:json/frame:abc,xyz + // returns all serialized models to json and two frames in 'ezc_frames' object // + // http://domain.tld/dir/controller/container:json/all_frames + // returns all serialized models to json and all frames in 'ezc_frames' object // + // http://domain.tld/dir/controller/container:json/main_stream + // returns all serialized models and the main ezc stream in 'main_stream' field // - // the whole algorithm how the answer is created is shown below: + // http://domain.tld/dir/controller/container:json/main_stream/all_frames + // returns all serialized models to json, all frames and the main stream // - // - // answer_source: bin_stream - // |--------------->-------------- send out_bin_stream - // | - // | - // | - // | - // | answer_source: models and use_ezc_engine: true - // |------------------------>------------------------ - // | | - // | use ezc engine - // | for converting models - // | to out_main_stream and frame_streams - // | | - // | change answer_source to - // | frame_stream (if there is 'allframes' parameter or 'frame' parameter is not empty) - // | or to main_stream otherwise - // | | - // |-------------------------<----------------------- - // | - // | - // | - // | - // | - // | answer_source: main_stream - // |----------------------->------------------------- - // | | - // | depending on answer_container - // | | - // | -------------------------------------------------------------------- - // | | | | | - // | text json xml csv - // | | | | | - // | send send send send - // | out_main_stream out_main_stream out_main_stream out_main_stream - // | as json text in one cell in first csv cell - // | (without making e.g. - // | an object) - // | e.g. "text" text - // | - // | - // | - // | - // | answer_source: frame_streams - // |-------->------- - // | | - // | | - // | depending on - // | 'frame' string variable and 'allframes' - // | | - // | | - // | | is 'frame' string empty or there is 'allframes' parameter - // | |----------------------->--------------------- - // | | | - // | | depending on answer_container - // | | | - // | | -------------------------------------------------------------------- - // | | | | | | - // | | text json xml csv - // | | | | | | - // | | send text serialize serialize serialize - // | | from all frames all frames all frames all frames - // | | one by one to json to xml to csv - // | | - // | | - // | | - // | | - // | | is 'frame' string not empty and there is no 'allframes' parameter - // | |----------------------->--------------------- - // | | - // | depending on answer_container - // | | - // | -------------------------------------------------------------------- - // | | | | | - // | text json xml csv - // | | | | | - // | send text serialize serialize serialize - // | from one frame one frame one frame one frame - // | to json to xml to csv - // | - // | - // | - // | - // | - // | - // | answer_source: models - // |------------------------>------------------------ - // | - // depending on answer_container - // | - // -------------------------------------------------------------------- - // | | | | - // text json xml csv - // | | | | - // serialize serialize models serialize models serialize models - // models to to json to xml to csv - // csv - // but return - // as text/plain - // change maybe answer_bin_stream -> source_bin_stream? - enum AnswerSource - { - answer_bin_stream, - answer_models, - answer_main_stream, - answer_frame_streams, - }; + bool send_bin_stream; + bool send_main_stream; + bool send_all_frames; + std::vector send_frames; + + bool use_ezc_engine; + bool serialize_models; // change maybe answer_text -> container_text? - enum AnswerContainer + enum ContainerType { - answer_text, - answer_json, - answer_xml, - answer_csv, + container_raw, + container_json, + container_xml, + container_csv, }; - AnswerSource answer_source; - AnswerContainer answer_container; + ContainerType container_type; - bool use_ezc_engine; - std::wstring frame; - bool send_all_frames; + // at the beginning those with higher priority + std::vector accept_mime_types; // request status @@ -516,9 +424,7 @@ public: void RequestEnds(); void Clear(); - bool PrepareAnswerType(); - bool CheckContainerParameter(); - bool CheckAnswerParameter(); + void PrepareAnswerType(); bool IsParam(const wchar_t * param_name); bool IsParam(const std::wstring & param_name); @@ -550,7 +456,8 @@ public: template void AddCookie(const NameType & name, const ValueType & value, pt::Date & expires); - + bool has_frame(const wchar_t * frame); + bool has_frame(const std::wstring & frame); private: @@ -562,6 +469,9 @@ private: void ClearOutputStreams(); + void CheckAcceptHeader(); + void CheckContainerParameter(); + void PrepareFrameNames(); void current_dir(morm::Wrapper & wrapper); void last_item_wrapper(morm::Wrapper & wrapper); diff --git a/winixd/functions/download.cpp b/winixd/functions/download.cpp index 3802444..d01b75e 100644 --- a/winixd/functions/download.cpp +++ b/winixd/functions/download.cpp @@ -91,7 +91,7 @@ void Download::MakeGet() } cur->request->x_sendfile.clear(); - cur->request->answer_source = Request::AnswerSource::answer_bin_stream; + cur->request->send_bin_stream = true; } } else diff --git a/winixd/functions/emacs.cpp b/winixd/functions/emacs.cpp index e10bf73..7f668a9 100644 --- a/winixd/functions/emacs.cpp +++ b/winixd/functions/emacs.cpp @@ -172,7 +172,7 @@ void Emacs::MakePost() system->RedirectToLastFunction(nullptr, false); answer.add(L"redirect_to", cur->request->redirect_to); - if( cur->request->answer_container != Request::AnswerContainer::answer_text ) + if( cur->request->container_type != Request::ContainerType::container_raw ) { cur->request->redirect_to.clear(); } diff --git a/winixd/main/Makefile.dep b/winixd/main/Makefile.dep index ab80125..b22369b 100644 --- a/winixd/main/Makefile.dep +++ b/winixd/main/Makefile.dep @@ -184,5 +184,6 @@ main.o: ../../../winix/winixd/core/cookieparser.h main.o: ../../../winix/winixd/core/postmultiparser.h main.o: ../../../winix/winixd/core/acceptencodingparser.h main.o: ../../../winix/winixd/core/acceptbaseparser.h +main.o: ../../../winix/winixd/core/acceptparser.h main.o: ../../../winix/winixd/core/winixrequest.h main.o: ../../../winix/winixd/core/version.h diff --git a/winixd/templates/Makefile.dep b/winixd/templates/Makefile.dep index f5a7716..f141b92 100644 --- a/winixd/templates/Makefile.dep +++ b/winixd/templates/Makefile.dep @@ -1051,6 +1051,8 @@ filters.o: ../../../pikotools/src/convert/convert.h filters.o: ../../../pikotools/src/convert/inttostr.h filters.o: ../../../pikotools/src/convert/patternreplacer.h filters.o: ../../../pikotools/src/convert/double.h +filters.o: ../../../pikotools/src/convert/misc.h +filters.o: ../../../pikotools/src/utf8/utf8_stream.h generic.o: templates.h ../../../ezc/src/ezc.h ../../../ezc/src/generator.h generic.o: ../../../ezc/src/blocks.h ../../../ezc/src/item.h generic.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h diff --git a/winixd/templates/winix.cpp b/winixd/templates/winix.cpp index baf7141..9beebd7 100644 --- a/winixd/templates/winix.cpp +++ b/winixd/templates/winix.cpp @@ -383,7 +383,14 @@ void winix_is_htmx_request(Info & i) void winix_frame_is(Info & i) { - i.res = cur->request->frame == i.par; + for(std::wstring & f: cur->request->send_frames) + { + if( f == i.par ) + { + i.res = true; + break; + } + } }