Cgi Tcl Reference Documentation

Cgi

Deprecated To be removed in a future version, and should no longer be used.
Current Version: 10.1.3

Provides the ability to receive HTTP requests and all associated parameters, HTTP header fields, etc. A common use is for receiving HTTP uploads. Provides the ability to receive uploads that stream directly to disk, eliminating memory requirements for large files. Also provides the ability to receive uploaded files directly in memory.

Object Creation

set myCgi [new CkCgi]

Properties

AsyncBytesRead
integer
set intVal [CkCgi_get_AsyncBytesRead $myCgi]

To be documented soon...

top
AsyncInProgress
boolean 1/0
set boolVal [CkCgi_get_AsyncInProgress $myCgi]

To be documented soon...

top
AsyncPostSize
integer
set intVal [CkCgi_get_AsyncPostSize $myCgi]

To be documented soon...

top
AsyncSuccess
boolean 1/0
set boolVal [CkCgi_get_AsyncSuccess $myCgi]

To be documented soon...

top
DebugLogFilePath
string
# ckStr is a CkString
CkCgi_get_DebugLogFilePath $myCgi $ckStr
set strVal [CkCgi_get_debugLogFilePath $myCgi]
CkCgi_put_DebugLogFilePath $myCgi $strVal

If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. This logging helps identify the context and history of Chilkat calls leading up to any crash or hang, aiding in debugging.

Enabling the VerboseLogging property provides more detailed information. This property is mainly used for debugging rare instances where a Chilkat method call causes a hang or crash, which should generally not happen.

Possible causes of hangs include:

  • A timeout property set to 0, indicating an infinite timeout.
  • A hang occurring within an event callback in the application code.
  • An internal bug in the Chilkat code causing the hang.

More Information and Examples
top
IdleTimeoutMs
integer
set intVal [CkCgi_get_IdleTimeoutMs $myCgi]
CkCgi_put_IdleTimeoutMs $myCgi $intVal

To be documented soon...

top
LastErrorHtml
string
# ckStr is a CkString
CkCgi_get_LastErrorHtml $myCgi $ckStr
set strVal [CkCgi_get_lastErrorHtml $myCgi]

Provides HTML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastErrorText
string
# ckStr is a CkString
CkCgi_get_LastErrorText $myCgi $ckStr
set strVal [CkCgi_get_lastErrorText $myCgi]

Provides plain text information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastErrorXml
string
# ckStr is a CkString
CkCgi_get_LastErrorXml $myCgi $ckStr
set strVal [CkCgi_get_lastErrorXml $myCgi]

Provides XML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastMethodSuccess
boolean 1/0
set boolVal [CkCgi_get_LastMethodSuccess $myCgi]
CkCgi_put_LastMethodSuccess $myCgi $boolVal

Indicates the success or failure of the most recent method call: 1 means success, 0 means failure. This property remains unchanged by property setters or getters. This method is present to address challenges in checking for null or Nothing returns in certain programming languages.

top
NumParams
integer
set intVal [CkCgi_get_NumParams $myCgi]

To be documented soon...

top
NumUploadFiles
integer
set intVal [CkCgi_get_NumUploadFiles $myCgi]

To be documented soon...

top
ReadChunkSize
integer
set intVal [CkCgi_get_ReadChunkSize $myCgi]
CkCgi_put_ReadChunkSize $myCgi $intVal

To be documented soon...

top
SizeLimitKB
integer
set intVal [CkCgi_get_SizeLimitKB $myCgi]
CkCgi_put_SizeLimitKB $myCgi $intVal

To be documented soon...

top
StreamToUploadDir
boolean 1/0
set boolVal [CkCgi_get_StreamToUploadDir $myCgi]
CkCgi_put_StreamToUploadDir $myCgi $boolVal

To be documented soon...

top
UploadDir
string
# ckStr is a CkString
CkCgi_get_UploadDir $myCgi $ckStr
set strVal [CkCgi_get_uploadDir $myCgi]
CkCgi_put_UploadDir $myCgi $strVal

To be documented soon...

top
Utf8
boolean 1/0
set boolVal [CkCgi_get_Utf8 $myCgi]
CkCgi_put_Utf8 $myCgi $boolVal

When set to 1, all "const char *" arguments are interpreted as utf-8 strings. If set to 0 (the default), then "const char *" arguments are interpreted as ANSI strings. Also, when set to 1, and Chilkat method returning a "const char *" is returning the utf-8 representation. If set to 0, all "const char *" return values are ANSI strings.

top
VerboseLogging
boolean 1/0
set boolVal [CkCgi_get_VerboseLogging $myCgi]
CkCgi_put_VerboseLogging $myCgi $boolVal

If set to 1, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is 0. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

top
Version
string
# ckStr is a CkString
CkCgi_get_Version $myCgi $ckStr
set strVal [CkCgi_get_version $myCgi]

Version of the component/library, such as "10.1.0"

More Information and Examples
top

Methods

AbortAsync
CkCgi_AbortAsync

To be documented soon...

top
AsyncReadRequest
set retBool [CkCgi_AsyncReadRequest]

To be documented soon...

top
GetEnv
# varName is a string
# outStr is a CkString (output)
set status [CkCgi_GetEnv $varName $outStr]
set retStr [CkCgi_getEnv $myCgi $varName]

To be documented soon...

Returns 1 for success, 0 for failure.

top
GetParam
# paramName is a string
# outStr is a CkString (output)
set status [CkCgi_GetParam $paramName $outStr]
set retStr [CkCgi_getParam $myCgi $paramName]

To be documented soon...

Returns 1 for success, 0 for failure.

top
GetParamName
# index is an integer
# outStr is a CkString (output)
set status [CkCgi_GetParamName $index $outStr]
set retStr [CkCgi_getParamName $myCgi $index]

To be documented soon...

Returns 1 for success, 0 for failure.

top
GetParamValue
# index is an integer
# outStr is a CkString (output)
set status [CkCgi_GetParamValue $index $outStr]
set retStr [CkCgi_getParamValue $myCgi $index]

To be documented soon...

Returns 1 for success, 0 for failure.

top
GetRawPostData
# outData is a CkByteData (output)
set status [CkCgi_GetRawPostData $outData]

To be documented soon...

Returns 1 for success, 0 for failure.

top
GetUploadData
# index is an integer
# outData is a CkByteData (output)
set status [CkCgi_GetUploadData $index $outData]

To be documented soon...

Returns 1 for success, 0 for failure.

top
GetUploadFilename
# index is an integer
# outStr is a CkString (output)
set status [CkCgi_GetUploadFilename $index $outStr]
set retStr [CkCgi_getUploadFilename $myCgi $index]

To be documented soon...

Returns 1 for success, 0 for failure.

top
GetUploadSize
# index is an integer
set retInt [CkCgi_GetUploadSize $index]

To be documented soon...

top
IsGet
set retBool [CkCgi_IsGet]

To be documented soon...

top
IsHead
set retBool [CkCgi_IsHead]

To be documented soon...

top
IsPost
set retBool [CkCgi_IsPost]

To be documented soon...

top
IsUpload
set retBool [CkCgi_IsUpload]

To be documented soon...

top
ReadRequest
set retBool [CkCgi_ReadRequest]

To be documented soon...

top
SaveNthToUploadDir
# index is an integer
set retBool [CkCgi_SaveNthToUploadDir $index]

To be documented soon...

top
SleepMs
# millisec is an integer
CkCgi_SleepMs $millisec

To be documented soon...

top
TestConsumeAspUpload
# path is a string
set retBool [CkCgi_TestConsumeAspUpload $path]

To be documented soon...

top