Overview
Comment: | Added recovery from bad form. but it is broken and I don't know why. Still seems rare ... |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
44c407806c81f9be9a0460749d548944 |
User & Date: | matt on 2016-09-24 07:07:37 |
Other Links: | manifest | tags |
Context
2016-09-25
| ||
17:10 | Added conversion to s:session-var-get. WARNING: Need to use 'raw in many cases check-in: 445ea184ae user: matt tags: trunk | |
2016-09-24
| ||
07:07 | Added recovery from bad form. but it is broken and I don't know why. Still seems rare ... check-in: 44c407806c user: matt tags: trunk | |
2016-09-22
| ||
06:28 | Added safe handling for params check-in: 4bccacb50f user: matt tags: trunk | |
Changes
Modified formdat.scm from [5b06a4d3e0] to [9664a46ced].
︙ | |||
105 106 107 108 109 110 111 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + + + + | (let* ((datstr (open-input-string dat)) (result (read-string (caar index) datstr)) (remdat (read-string #f datstr))) (close-input-port datstr) (list result remdat))))) ;; inp is port to read data from, maxsize is max data allowed to read (total) |
︙ | |||
160 161 162 163 164 165 166 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - - - + + + + - + - + + - + + | (let ((request-method (get-environment-variable "REQUEST_METHOD"))) (if (and request-method (string=? request-method "POST")) (formdat:load-all-port (current-input-port))))) ;; (s:process-cgi-input (caaar dat)) (define (formdat:load-all-port inp) |
︙ | |||
199 200 201 202 203 204 205 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | + + + - + - + | alldats) ;; handle single part form ;; (if (and (string? name) ;; (string=? name "")) ;; this is the short form input I guess ;; (let* ((datstr (caar datlst)) ;; (munged (s:process-cgi-input datstr))) ;; (print "datstr: " datstr " munged: " munged) (if (and (not (null? alldats)) (not (null? (car alldats))) (not (null? (caar alldats)))) |
︙ |
Modified html-filter.scm from [14891b2741] to [7dc1b6a3b0].
︙ | |||
177 178 179 180 181 182 183 184 185 186 187 188 189 190 | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | + + + + + | (string-append result chstr rem) (string-append result head)))) ;; (print "head: " head " num: " num " ch: |" ch "| chstr: " chstr) (if (null? tail) newres (loop (car tail)(cdr tail) newres)))))))) ;; probably a bug: ;; ;; (s:process-cgi-input "=bar") ;; => ((bar "")) ;; (define (s:process-cgi-input instr) (map (lambda (xy) (list (string->symbol (s:decode-str (car xy))) (if (eq? (length xy) 1) "" (s:decode-str (cadr xy))))) (s:divy-up-cgi-str instr))) |
︙ |
Modified setup.scm from [c2c51e03a9] to [77c57eae95].
︙ | |||
77 78 79 80 81 82 83 84 85 86 87 88 89 90 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | + + | (define (s:session-var-get-n-del! key) (let ((val (session:page-get s:session key))) (session:del! s:session "*sessionvars*" key) val)) (define (s:session-var-del! key) (session:del! s:session "*sessionvars*" key)) (define s:session-var-delete! s:session-var-del!) ;; utility to get all vars as hash table (define (s:session-get-sessionvars) (sdat-get-sessionvars s:session)) ;; inputs ;; |
︙ |