Artifact [757e5f5ce9]
Not logged in

Artifact 757e5f5ce949b335b2e9226d4e74379243f7c5e1:

Ticket change [757e5f5ce9] - Ticket [4060715d46] Implement FastCGI interface status still Open with 1 other change by drh 2011-11-25 15:31:22.
D 2011-11-25T15:31:22.938
J +comment \n\n<hr\s/><i>drh\sadded\son\s2011-11-25\s15:31:22\sUTC:</i><br\s/>\nA\sreasonable\simplementation\sof\sFastCGI\sfor\sFossil\swould\sbe:\r\n\r\n\s\s1.\s\sCapture\sthe\sFastCGI\sparameters\sand\squery\scontent\r\n\s\s2.\s\sWrite\sthe\squery\sparameters\sand\scontent\sinto\sa\stemporary\sfile\r\n\s\s\s\s\s\sformatted\sas\sa\snormal\sHTTP\srequest\r\n\s\s3.\s\sUse\sfossil_system()\sto\srecursively\sinvoke\sFossil\sto\sprocess\r\n\s\s\s\s\s\sthe\sgenerated\sHTTP\srequest,\swriting\sthe\sresults\sinto\sanother\r\n\s\s\s\s\s\stemporary\sfile.\r\n\s\s4.\s\sRead\sback\sthe\sreply\sout\sof\sthe\ssecond\stemporary\sfile\r\n\s\s5.\s\sReformat\sand\ssend\sthe\sreply\sback\sto\sthe\sFastCGI\srequestor\r\n\s\s6.\s\sDelete\sthe\stwo\stemporary\sfiles.\r\n\r\nThe\sabove\sis\sbasically\sthe\sprocedure\sused\sto\simplement\sthe\s"ui"\sand\r\n"server"\scommands\sfor\swindows,\sas\sshown\sin\sthe\r\nwin32_process_one_http_request()\sfunction\sin\sthe\swinhttp.c\ssource\sfile.\s\sThe\r\nmain\sdifference\sis\sthat\sin\sthe\scase\sof\sthe\s"ui"\sand\s"server"\scommands,\r\nthe\sincoming\srequest\sis\salready\sa\svalid\sHTTP\srequest\sand\sdoes\snot\sneed\r\nto\sbe\stranslated\sas\sit\sis\smoved\sin\sand\sout\sof\sthe\stemporary\r\nfiles.\s\sSo,\sin\sother\swords,\sa\sFossil\sFastCGI\simplementation\swould\sbasically\r\nbe\sthe\ssame\sas\sthe\swindows\sui/server\simplementation\swith\ssome\sextra\r\ncoding\sand\sdecoding\slogic\sthrown\sin.\r\n\r\nNote\sthat\sthe\sabove\simplementation\sis\scompletely\sisolated\sand\sdoes\r\nnot\srequire\sany\schanges\sto\sany\sexisting\sparts\sof\sFossil.\s\sOne\shas\r\nmerely\sto\sadd\sa\snew\s"fastcgi.c"\ssource\sfile\sthat\simplements\sthe\sabove.\r\nAll\sof\sthe\sFastCGI\sdecoding\sand\stranslation\sand\sprotocol\shandling\swould\r\nbe\scontained\sentirely\sin\sthat\sone\ssource\sfile.\r\n\r\nI\sthink\sthe\sonly\sreason\sfor\swanting\sto\ssupport\sFastCGI\sis\sso\sthat\syou\r\ncan\srun\sFossil\smore\seasily\susing\snginx.\s\sFastCGI\swon't\sbe\sany\smore\sefficient.\r\nIn\sfact,\sif\syou\sconsider\sthe\sextra\sencoding\sand\sdecoding\slogic\sthat\shas\r\nto\srun,\sFastCGI\swill\sprobably\sbe\sless\sefficient\sthan\ssimply\sconfiguring\r\nnginx\sto\srelay\srequests\sto\sa\srunning\sFossil\s"server"\sinstance.\r\n\r\n
K 4060715d461650592727162777797ace6fb83d7b
U drh
Z 1a0e5c8221049cd3c3911ff29b024024