Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: need example of upload

From: g:santilli:tiscalinet:it at: 13-Sep-2003 10:56

Hi Andreas, On Friday, September 12, 2003, 5:39:47 PM, you wrote: AB> --- snip - read-post-data --- AB> read-post-data: func [ AB> {Reads the HTTP entity body} AB> /safe "Disables evaluation of content-length header." AB> /local len data tmp AB> ] [ AB> len: load any [ all [safe "65536"] system/options/cgi/content-length "0" ] AB> data: make string! len AB> tmp: make string! len AB> while [ 0 < read-io system/ports/input tmp len ] [ AB> insert tail data tmp AB> clear tmp AB> ] AB> data AB> ] AB> --- snap --- BTW, in Temple I'm just using something like: set-modes system/ports/input [binary: on] content: copy/part system/ports/input content-length (after checking the content length exists and attempting a to integer! etc.). I think that if you want to keep your /SAFE refinement it should be possible to just use: set-modes system/ports/input [binary: on] content: copy system/ports/input Of course very old versions of /Core may still require using READ-IO like in your code above. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: