Commits

Greg Slepak committed e020246

fixed 10.1.11 compatibility issue in request

  • Participants
  • Parent commits 512f20e

Comments (0)

Files changed (2)

example-site/dragonfly-framework/lib/request.lsp

 ; broken 'read-buffer' function that can't handle large amounts of data.
 ; this may be fixed in a future version of newLISP, but for now we're doing
 ; it the C-way.
-(define (handle-binary-data , (chunk "") (chunk-size 8192) (max-bytes MAX_POST_LENGTH) read)
-	(while (and (setf read (read (device) chunk chunk-size)) chunk (not (zero? max-bytes)))
+(define (handle-binary-data , (chunk "") (chunk-size 8192) (max-bytes MAX_POST_LENGTH) bytes)
+	(while (and (setf bytes (read (device) chunk chunk-size)) chunk (not (zero? max-bytes)))
 		(extend $BINARY chunk)
-		(-- max-bytes read)
+		(-- max-bytes bytes)
 		(when (< max-bytes chunk-size) (setf chunk-size max-bytes))
 	)
 )

example-site/dragonfly-framework/plugins-inactive/db/database_utils.lsp

 ; 	)
 ; )
 
+(context MAIN)
+
 (define (fn-query-with-db db query func params , sql keys values)
 	(when (setf sql (db:prepare-sql query))
 		(when (or (not params) (sql:bind-params params))