Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Rebol Programming/read-cgi

From Wikibooks, open books for an open world
<Rebol Programming
This page may need to bereviewed for quality.

USAGE:

[edit |edit source]
READ-CGI /limit size

DESCRIPTION:

[edit |edit source]

Read CGI data from web server input stream. Return data as string.

READ-CGI is a function value.

REFINEMENTS

[edit |edit source]
  • /limit
    • size -- Option to limit to this number of bytes (Type: any)

SOURCE CODE

[edit |edit source]
read-cgi: func [    {Read CGI data from web server input stream. Return data as string.}     /limit size "Option to limit to this number of bytes"     /local data buffer][    either system/options/cgi/request-method = "post" [        data: make string! 1020         buffer: make string! 16380         while [positive? read-io system/ports/input buffer 16380] [            append data buffer             clear buffer             if all [limit (length? data) > size] [                do make error! reform [                    "read-cgi aborted - posting is too long:"                     length? data "limit:" size                ]            ]        ]    ] [data: system/options/cgi/query-string]     any [data copy ""]]
Retrieved from "https://en.wikibooks.org/w/index.php?title=Rebol_Programming/read-cgi&oldid=3352968"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp