SCGI::Request(3)

NAME
SCGI::Request

DESCRIPTION
This module implements the part of the SCGI protocol that reads the environment. All that remains after this is the content of the request. The protocol and this module guarentee that there will be a CONTENT_LENGTH for the body of the request in the environment.

SYNOPISIS
  # $request got from SCGI
  $request->read_env;

  read $request->connection, my $body, $request->env->{CONTENT_LENGTH};

  public methods

read_env
    Read the environment in a blocking or non-blocking manner, per parameter to "SCGI-"new>. Returns true if it has finished.

env Gets the environment for this request after it has been read. This will return undef until "read_env" or "sysread_env" has been called and returned true.

connection
    Returns the open connection to the client.

close
    Closes the connection.

blocking
    Returns true if the connection is blocking.

set_blocking
    If boolean argument is true turns on blocking, otherwise turns it off.

  private methods

_new
    Creates a new SCGI::Request. This is used by SCGI in the "accept" method, so if you are considering using this, use that instead.

_decode_env
    Takes the encoded environment as a string and sets the env ready for access with "env".

_set_env
    Sets the environment for this request.

_blocking_read_env
    Reads and decodes the environment in one go. Returns true on success, raises an exception on failiure.

AUTHOR
Thomas Yandell <mailto:tom+scgi@vipercode.com>

COPYRIGHT
Copyright 2005, 2006 Viper Code Limited. All rights reserved.

LICENSE
This file is part of SCGI (perl SCGI library).

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.