Check-in [863850b1b1]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:minor scgi fixes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 863850b1b187505bed518863db0c8542afbdc9cc
User & Date: aldo 2016-12-11 14:39:36
Context
2016-12-11
14:40
minor scgi fixes check-in: 0d8bb0bf16 user: aldo tags: trunk
14:39
minor scgi fixes check-in: 863850b1b1 user: aldo tags: trunk
14:36
minor scgi fixes check-in: a9c2207fd7 user: aldo tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to scgi.sls.

    78     78   	      (#f)
    79     79   	    ;(printf "nchildren ~d~n" nchildren)
    80     80   	    (printf "scgi: waiting for connection...~n")
    81     81   	    (let ([cli #f])
    82     82   	      (dynamic-wind
    83     83   		  (lambda () (set! cli (accept sock)))
    84     84   		  (lambda ()
    85         -		    (printf "accepted connection~n")
           85  +		    (printf "scgi: accepted connection~n")
    86     86   		    (if (> nchildren max-children)
    87     87   			(sleep (make-time 'time-duration 0 1)))
    88     88   		    (printf "scgi: forking..~n")
    89     89   		    (let ([pid (fork)])
    90     90   		      (if (= pid 0)			
    91     91   			  (guard (e [else (display "scgi: handler error: ")
    92     92   					  (display-condition e)
................................................................................
   118    118   	(socket)
   119    119   	(scgi))
   120    120   
   121    121   (define sock (socket 'inet 'stream '() 0))
   122    122   (connect/inet sock "localhost" 8086)
   123    123   (define h (scgi-headers->bytevector '(("CONTENT_LENGTH" . "10") 
   124    124   				      ("SCGI" . "1")
   125         -				      ("REQUEST_METHOD" . "GET") 
          125  +				      ("REQUEST_METHOD" . "POST") 
   126    126   				      ("REQUEST_URI" . "/chez"))))
   127    127   (write-netstring sock h)
   128    128   (put-bytevector sock (bytevector 1 2 3 4 5 6 7 8 9 0))
   129    129   (flush-output-port sock)
   130    130   (close-port sock)
   131    131   
   132    132   ;; or just configure nginx with something like this: