Copyright: Copyright (c) 1997 Corel Corporation
Citation: Copyright (c) 1997 Corel Corporation


AfterRequest

Syntax

AfterRequest(Request, Response)

Description

This event is triggered by the completion of an HTTP Request/Response transaction. It is usually used for logging the transaction.

 Note

•	AfterRequest only fires if NotifyAfterRequest is set to True.


DoShutDown

Syntax

DoShutDown(var CancelFlag Logical)

Description

This event is triggered by setting Active to False or toggling ToggleActive. If CancelFlag is set to True, the Corel Web Server Control shutdown is canceled.


DoStartUp

Syntax

DoStartUp(var CancelFlag Logical)

Description

This event is triggered by setting Active to True or toggling ToggleActive. If CancelFlag is set to True, the Corel Web Server Control startup is canceled.


OnGetQuery

Syntax

OnGetQuery(Request, Response)

Description

This event is triggered by an HTTP GET method that includes a query (a question mark followed by a query string).

 Note

•	OnGetQuery only fires if NotifyOnGetQuery is set to True.


OnGetRequest

Syntax

OnGetRequest(Request, Response)

Description

This event is triggered by an HTTP GET method.

 Note

•	OnGetRequest only fires if NotifyOnGet is set to True.


OnHeadRequest

Syntax

OnHeadRequest(Request, Response)

Description

This event is triggered by an HTTP HEAD method.

 Note

•	OnHeadRequest only fires if NotifyOnHead is set to True.


OnPostRequest

Syntax

OnPostRequest(Request, Response)

Description

This event is triggered by an HTTP POST method.

 Note

•	OnPostRequest only fires if NotifyOnPost is set to True.


AboutBox

Method

Displays the About dialog box.

Syntax

AboutBox( )


AddMIMEType

Method

Used to add a new file extension and MIME type/subtype record to the MIME Types database.

Syntax

AddMIMEType(Extension String, Type String, SubType String) Logical


GetMIMEType

Method

Gets a MIME type from the MIME Types database by its index number, where the first item = 0. If the type specified by nIndex can't be found, returns False.

Syntax

GetMIMEType(nIndex LongInt, var Extension String, var Type String, var SubType String) Logical


GetMIMETypeByExt

Method

Gets a MIME type from the MIME Types database by looking up Extension. If Extension can't be found, returns False. If Type and SubType aren't given, they are returned when Extension is found.

Syntax

GetMIMETypeByExt(Extension String, var Type String, var SubType String) Logical


RemoveMIMEType

Method

Removes the MIME Type with file extension Extension from the MIME Types database.

Syntax

RemoveMIMEType(Extension String)


SetMIMEType

Method

Changes the information in the MIME Types database in the record for Extension. If Extension isn't found, adds that record to the database.

Syntax

SetMIMEType(Extension String, Type String, SubType String) Logical


ToggleActive

Method

Changes the current state of the Corel Web Server Control Active property to the opposite state: On to Off, or Off to On.

Syntax

ToggleActive( ) Logical


AccessLog

Data type

String

Description

The name of the Access Log file where records of site access are stored for later use and analysis.

Values

N/A


Active

Data type

Logical

Description

Switches the Corel Web Server Control off and on. The server toggles Active when you change the form from Run mode to Design mode or Run mode to Design mode.

Values

True, False


AllowKeepAliveConnection

Data type

Logical

Description

If True, permits a request to keep the connection open. This allows a browser quicker access on its second request; it doesn't need to wait for a connection to open.

Setting AllowKeepAliveConnection to True uses up more of the server's available connections.

Values

True, False (Default = True)


BasePath

Data type

String

Description

The root directory where the Web pages are stored. For security reasons, don't use your own root directory. Choose a directory with subdirectories that users are allowed to access.

Values

Depends on the system.


ConnectionTimeOut

Data type

Integer

Description

The number of seconds to wait before issuing a time-out and breaking the connection. This property is used in both reading requests and sending responses. It also specifies how long to keep a keep-alive connection open.

Values

1 to 600


DebugLog

Data type

String

Description

The name of the Debug Log file where transaction records are stored for later tracing and debugging.

The log includes the buffer received from the browser, the buffer sent to the browser, and a dump of the variables from both the request and response.

Values

N/A


DefaultPage

Data type

String

Description

The default Web page name in each directory.

Values

Depends on the system.


EnableAccessLogging

Data type

Logical

Description

When set to True, logs connection history to a file in Common Log Format.

Values

True, False (Default = False)


EnableDebugLogging

Data type

Logical

Description

When set to True, logs debug information for transactions to a file for later tracing and debugging.

Values

True, False (Default = False)


FooterPage

Data type

String

Description

The full path plus a page with the information to appear at the bottom of each transferred page; like a template for the page footer.

Values

N/A


HTTPPort

Data type

Integer

Description

Port the server listens to for connections; no two servers can have the same port on the same machine.

Values

1 to 32767; default = 80.


HeaderPage

Data type

String

Description

The full path plus a page with the information to appear at the top of each transferred page; like a template for the page header.

Values

N/A


LookupClientName

Data type

Logical

Description

If set to true, attempts to convert an IP address to an Internet machine name. This takes more time than when LookupClientName is set to False, but more connection information is obtained.

Values

True, False (Default = True)


NMIMETypes

Data type

Integer

Description

The number of records in the MIME Types database, displayed on the MIME page of the Web Server Properties dialog box.

Values

Depends on the system.


MaxConnections

Data type

Integer

Description

Total number of connections allowed at one moment.

Values

1-255 (Default = 100)


MaxKeepAliveRequest

Data type

Integer

Description

The number of request/response transactions allowed for each Keep-Alive connection (if AllowKeepAliveConnection is set to True).

Values

1-1024 (Default = 5)


MinReadyConnections

Data type

Integer

Description

The number of threads to prepare for connection at startup and keep waiting after startup. The number must be equal to or less than MaxConnections. A higher number speeds connections but uses much more memory.

Values

0-255 (Default = 25)


NCompletedConnections

Data type

Integer

Description

If ShowCompletedConnections is set to True, the number of connections with Status = Dead to show in the Corel Web Server Control connection list.

Values

1-1M (Default = 1000)


NotifyOnGet

Data type

Logical

Description

If set to True, the server fires an OnGetRequest event when an HTTP GET request is received; otherwise, the request passes through without an event.

Setting NotifyOnGet to False can prevent bottlenecking with single-threaded applications like Corel Paradox if GET requests don't require any special event handling. See Performance tips for more information.

Values

True, False (Default = True)


NotifyOnGetQuery

Data type

Logical

Description

If set to True, the server fires an OnGetQuery event when an HTTP GET request with a query (? + string) is received; otherwise, the request passes through without an event.

Setting NotifyOnGetQuery to False can prevent bottlenecking with single-threaded applications like Corel Paradox if GET query requests don't require any special event handling. See Performance tips for more information.

Values

True, False (Default = True)


NotifyOnHead

Data type

Logical

Description

If set to True, the server fires an OnHeadRequest events when an HTTP HEAD request is received; otherwise, the request passes through without an event.

Setting NotifyOnHead to False can prevent bottlenecking with single-threaded applications like Corel Paradox if HEAD requests don't require any special event handling. See Performance tips for more information.

Values

True, False (Default = True)


NotifyAfterRequest

Data type

Logical

Description

If set to True, the server fires an AfterRequest event after an HTTP request is handled. Such events can be useful for logging.

Setting AfterRequest to False can prevent bottlenecking with single-threaded applications like Corel Paradox if you aren't logging or performing other tasks that require event handling after requests are processed. See Performance tips for more information.

Values

True, False (Default = True)


NotifyOnPost

Data type

Logical

Description

If set to True, the server fires an OnPostRequest event when an HTTP POST request is received; otherwise, the request passes through without an event.

Setting NotifyOnPost to False can prevent "bottle-necking" with single-threaded applications like Corel Paradox if POST requests don't require any special event handling. See Performance tips for more information.

Values

True, False (Default = True)


ShowActiveConnections

Data type

Logical

Description

When set to True, active threads appear in the server list (state = New/Recv, Processing, Sending).

Values

True, False (Default = True)


ShowCompletedConnections

Data type

Logical

Description

When set to True, completed thread connections (state = Dead) appear in the server list.

Values

True, False (Default = True)


UpdateServerStatusBar

Data type

Logical

Description

When set to True, the server Status Bar shows information about the current status of the server and its connections. UpdateServerStatusBar must be set to True before these updates are made, but updates are independent of other properties, such as ShowActiveConnections and ShowCompletedConnections.

Values

True, False (Default = True)


Accept

Data type

String

Description

A list of media ranges which are acceptable as a response to the request.

Values

N/A

 Example


AcceptCharset

Data type

String

Description

A list of character sets that are acceptable for the response.

Values

N/A


AcceptEncoding

Data type

String

Description

A list of media ranges similar to Accept that restrict the content-coding values which are acceptable in the response; often used to indicate acceptable compressions.

Values

N/A


AcceptLanguage

Data type

String

Description

A list of natural languages that are preferred as a response to the request.

Values

N/A


AuthorizationPassword

Data type

String

Description

Part of authentication credentials required for entry into the target realm (Web area): the entry password.

Values

N/A

 Example


AuthorizationUserid

Data type

String

Description

Part of authentication credentials required for entry into the target realm (Web area): the user ID, entered in response to a browser prompt.

Values

N/A

 Example


ClientName

Data type

String

Description

The client (User-Entity) Host Name (machine name) if LookupClientName is set to True; otherwise, the client's IP Address.

Values

N/A

 Example


Content

Data type

String

Description

The main content or Entity-Body of the client's Request. This is a raw string with no parsing.

Values

N/A


ContentLength

Data type

Integer

Description

The size of the "entity-body" or Content to be transferred, in decimal number of bytes.

Values

Equal to or greater than 0


Date (in Request)

Data type

Date

Description

The date of the request translated from standard HTTP form expressed in Universal Time (UT) to local time.

Values

Any valid date

 Example


Extra (in Request)

Data type

String (unparsed)

Description

Any header fields in the request that are unrecognized by the server.

The string must be in the standard HTTP 1.1 header field format:

field-name ":" [field-value] CRLF

Values

N/A


From

Data type

String

Description

An Internet email address for the human user who controls the requesting user agent.

Values

N/A


GetFieldName

Method

Returns the name of the field with the specified number (first field = 0). Related methods are:

GetFieldByIndex

GetField

Syntax

GetFieldName(FldNo Integer) String

Values

FldNo equal to or greater than 0

 Example


GetFieldByIndex

Method

The value, expressed as a string, of the field with the specified number (first field = 0). Related methods are:

GetFieldName

GetField

Syntax

GetFieldByIndex(FldNo Integer) String

Values

FldNo equal to or greater than 0

 Example


GetField

Method

The value, expressed as a string, of the field with the specified name. Related methods are:

GetFieldName

GetFieldByIndex

Syntax

GetField(FldName String) String

Values

N/A

 Example


GetCookieName

Method

The name of the nth cookie, where n = CookieNo (first cookie = 0). Related methods are:

GetCookieByIndex

GetCookie

Syntax

GetCookieName(CookieNo Integer) String

Values

CookieNo equal to or greater than 0


GetCookieByIndex

Method

The value, expressed as a string, of the nth cookie, where n = CookieNo (first cookie = 0). Related methods are:

GetCookieName

GetCookie

Syntax

GetCookieByIndex(CookieNo Integer) String

Values

CookieNo equal to or greater than 0


GetCookie

Method

The value, expressed as a string, of the cookie named CookieName. Related methods are:

GetCookieName

GetCookieByIndex

Syntax

GetCookie(CookieName String) String

Values

N/A

 Example


Host

Data type

String

Description

The host machine name, often the same as ClientName. If LookupClientName is set to False, you can often obtain the same information by checking the value of Host.

Values

Vary


HTTPVersion

Data type

String

Description

The HTTP version number used in the request [image] for example:

HTTP/1.1

If blank, then the version is assumed to be HTTP/0.9.

Values

Vary


IPAddress

Data type

String

Description

The IP address of the client (HTTP User-Entity), for example, 143.136.1.15.

Values

N/A

 Example


IfModifiedSince

Data type

Date

Description

A GET method modifier that makes the GET conditional: if the requested resource (for example, HTML file) has not been modified since the time specified in the field, a copy of the resource will not be returned from the server; instead, a "304 (not modified)" response will be returned without any Content string.

The date appears in local time. The server translates it from standard HTTP format (Universal or Greenwich Mean Time).

Values

Any valid date


NFields

Data type

Integer

Description

The number of fields in an HTML form.

Values

Equal to or greater than 0


NCookies

Data type

Integer

Description

The number of cookies in a cookie list.

Values

Equal to or greater than 0


Pragma

Data type

String

Description

Implementation-specific directives that may apply to any recipient along the request/response chain.

Values

N/A


QueryString

Data type

String

Description

In URI, the portion of the string after ?

Values

N/A

 Example


Referer

Data type

String

Description

The formatted string that identifies the client (requester) by name, location, or any other identifying characteristic, typically the HTTP URL.

Values

N/A


URI

Data type

String

Description

The named resource (such as HTML file) the browser is requesting. This can include the path with respect to the BasePath property. Any queries included in the URI string (text following a question mark) will be split off and assigned to the QueryString property.

Values

N/A

 Example


UserAgent

Data type

String

Description

The name of the browser that sent the request.

Values

N/A

 Example


Allow

Data type

String

Description

Lists the set of HTTP methods supported by the server.

Values

GET, POST, HEAD


ConnectionKeepAlive

Data type

Logical

Description

Forces a Keep Alive connection to be single-transaction when set to False. This is a one-time change, from True to False, and cannot be set back to True once changed.

Values

True, False


ContentEncoding

Data type

String

Description

Indicates what additional content codings, such as compressions, have been applied to the resource of a specified media type; allows a document to be compressed without losing the identity of its underlying media type.

Values

N/A


ContentType

Data type

String

Description

The media type (MIME type) of the entity-body (ResultString or ResultFile) transferred.

Values

N/A

 Example


Date (in Response)

Data type

Date

Description

The date and time the response message originated, in local time. The server will translate local time to the appropriate HTTP date/time (expressed in Universal or Greenwich Mean Time).

Values

Any valid date


Expires

Data type

Date

Description

The date and time (in local time) after which the entity-body (ResultString or ResultFile) should be considered stale; a date after which the information may no longer be valid. Applications must not cache the entity-body beyond the date given.

The server will translate local time to the appropriate HTTP date/time (expressed in Universal or Greenwich Mean Time).

Values

Any valid date


Extra (in Response)

Data type

String (unparsed)

Description

Any text to be included in the Response object that isn't included in another property. For example, this could be a return of Extra header fields included in a request.

The string must be in the standard HTTP 1.1 header field format:

field-name ":" [field-value] CRLF

Values

Varies


FooterFile

Data type

String

Description

Overrides the current footer filename, where the footer file is a file attached to the bottom of every ResultString or ResultFile, like a template. If FooterFile is blank, no footer file is used.

Values

N/A


GetCookie

Method

Gets the cookie variables you want to send in the Set-Cookie header response.

Syntax

GetCookie(var Name String, var Value String, var Expires Date,  var Domain String, var Path String) Logical


HeaderFile

Data type

String

Description

Overrides the current header filename, where the header file is a file attached to the top of every ResultString or ResultFile, like a template. If HeaderFile is blank, no header file is used.

Values

N/A


LastModified

Data type

Date

Description

The date and time (local) when the sender believes the resource, such as a table being queried, was last modified.

The server translates local time to the appropriate HTTP time format (Universal or Greenwich Mean Time).

Values

Any valid date


Location

Data type

String

Description

The new location of the resource (such as HTML file) that was identified by the Request URI, for example:

Location: http://www/w3/org/pub/WWW/People.html

This is used in redirecting a browser when the original location has changed.

You must set this property if you use the 301, 302, or 303 HTTP status codes.

Values

N/A


NBytesSent

Data type

Integer

Description

The number of bytes in ResultString or ResultFile, unless there is a header file or footer file, in which case its size is also included.

Values

Equal to or greater than 0


RestartThread

Method

In multi-thread containers, used to restart threads suspended with WaitForRestart.

Syntax

RestartThread( )


ResultFile

Data type

String

Description

A file path included in the Response object to indicate the location and name of a result file to be returned to the requester.

Values

N/A

 Example


ResultString

Data type

String

Description

A string of results information to return to the requester. If this string is not HTML, be sure to also set the ContentType property to specify the type.

Values

N/A

 Example


Server

Data type

String

Description

Information about the software used by the origin server to handle the request. (Revealing the specific software version of the server may pose a security risk. You can override this property to give the server a custom name.)

Values

N/A


SetCookie

Method

Adds a cookie with name Name, value Value, expiration date Expires, from Domain and Path to the response.

Syntax

SetCookie(Name String, Value String, Expires Date, Domain String, Path String) Logical

 Example


StatusCode

Data type

String

Description

A 3-digit integer result code of the attempt to understand and satisfy the request.

Codes are listed in the Hypertext Transfer Protocol specification draft defined by the Internet Engineering Task Force (IETF). For the latest protocol draft, see:

<URL:http://www.ics.uci.edu/pub/ietf/http/>

Values

N/A

 Example


WWWAuthenticateRealm

Data type

String

Description

Like WWW-Authenticate in the HTTP 1.1 specification, but it applies only to a particular server realm. This server supports only basic authentication and assumes all challenges will be basic. The HTTP status code must be set to 401 before sending this property.

Values

N/A

 Example


WaitForRestart

Data type

Logical

Description

For multi-threaded containers, used to keep the server thread waiting.

Values

True, False


Web Server Properties dialog box (Server page)

The settings on this page control how the Corel Web Server Control handles connections.

Dialog box options

HTTP Port

Sets the HTTPPort property.

Min Ready Connections

Sets the MinReadyConnections property.

Max Connections

Sets the MaxConnections property.

Connection Timeout

Sets the ConnectionTimeOut property.

Keep Alive Connections

Allow Keep Alive Connections

Sets the AllowKeepAliveConnection property.

Max Requests Per Connection

Sets the MaxKeepAliveRequest property.


Web Server Properties dialog box (Pages page)

The settings on this page indicate the location of Web pages accessed by the Corel Web Server Control.

Dialog box options

Base Path

Sets the BasePath property.

Default Page

Sets the DefaultPage property.

Footer Page

Sets the FooterPage property.

Header Page

Sets the HeaderPage property.


Web Server Properties dialog box (Logging page)

The settings on this page indicate whether to keep log files of connections and transactions and , if so, the names of these files.

Dialog box options

Access Logging

These settings enable and name a log file of users who connected to the server. The access log file is written in Common Log Format.

Enable Access Logging

Sets the EnableAccessLogging property.

Access File Name

Sets the AccessLog property.

Debug Logging

These settings enable and name a debug log file of debug information for transactions handled by the server.

Enable Debug Logging

Sets the EnableDebugLogging property.

Debug File Name

Sets the DebugLog property.


Web Server Properties dialog box (MIME page)

This page displays records in the Corel Web Server Control MIME Types database. You can use the buttons to add, edit, and remove MIME media-type records. The number of records in the MIME Types database determines the value of the NMIMETypes property.

Add

Displays the New MIME Type dialog box where you can type a file extension with associated media type and subtype.

Extension

The extension used for a certain media type [image] for example, .TXT.

MIME Type

The main media type associated with an extension [image] for example, text.

MIME Subtype

The category of the main media type associated with an extension [image] for example, plain.

Edit

Displays the Change MIME Type dialog box where you can change the MIME Type or MIME Subtype associated with the selected extension.

Remove

Deletes the selected extension's record.


Web Server Properties dialog box (Events page)

The settings on this page must be set to True (enabled) before you can use the associated event.

Dialog box options

Notify on GET Request

Sets the NotifyOnGet property and enables the OnGetRequest event.

Notify on GET Query Request

Sets the NotifyOnGetQuery property and enables the OnGetQuery event.

Notify on POST Request

Sets the NotifyOnPost property and enables the OnPostRequest event.

Notify on HEAD Request

Sets the NotifyOnHead property and enables the OnHeadRequest event.

Notify After Request

Sets the NotifyAfterRequest property and enables the AfterRequest event.


Web Server Properties dialog box (Status page)

The settings on this page control client identification detail and status display.

Dialog box options

Enable Client Name Lookup

Sets the LookupClientName property.

Enable Server Status Bar

Sets the UpdateServerStatusBar property.

Show Active Connections

Sets the ShowActiveConnections property.

Show Completed Connections

Sets the ShowCompletedConnections property.

Number of Completed Connections

Sets the NCompletedConnections property.