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