[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_conn

Overview

Find information about the HTTP connection. The connId is passed in to Tcl operation functions.

Syntax

ns_conn authpassword connId

ns_conn authuser connId

ns_conn contentlength connId

ns_conn form connId

ns_conn headers connId

ns_conn host connId

ns_conn location connId

ns_conn method connId

ns_conn outputheaders connId

ns_conn peeraddr connId

ns_conn port connId

ns_conn protocol connId

ns_conn query connId

ns_conn request connId

ns_conn url connId

ns_conn urlc connId

ns_conn urlv connId

ns_conn version connId

Description

ns_conn authpassword returns the decoded user password from the authorization data.

ns_conn authuser returns the decoded user name from the authorization data.

ns_conn contentlength returns the number of bytes in the content passed in.

ns_conn form returns any submitted form data as an ns_set. This form data may have been submitted with a POST or appended to the URL in a GET request.

ns_conn headers returns any header data as an ns_set where the keys are the field names. The case of the returned field names depends on the HeaderCase configuration parameter. By default, HeaderCase is "Preserve", which means case is preserved.

ns_conn host returns the host part of the URL in the HTTP request.

ns_conn location returns the location string for this virtual server in the form protocol://hostname[:port].

ns_conn method returns the HTTP method.

ns_conn outputheaders returns the set of headers that will be sent out when a result is returned to the client.

ns_conn peeraddr returns the IP address of the other side of the HTTP connection. The IP address is returned in the form of a string separated with periods (e.g., 155.164.59.75).

ns_conn port returns the port specified explicitly in the URL of the HTTP request.

ns_conn protocol returns the protocol of the URL in the HTTP request (usually unspecified)

ns_conn query returns any query data that was part of the HTTP request.

ns_conn request returns the HTTP request line.

ns_conn url returns the URL of the HTTP request.

ns_conn urlc returns the number of elements (delimited by `/') in the URL of the HTTP request.

ns_conn urlv returns a list containing the pieces of the URL delimited by `/'.

ns_conn version returns the version of the HTTP request. This is usually 0.9 or 1.0.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.