Scroll to navigation

SCGI::Request(3pm) User Contributed Perl Documentation SCGI::Request(3pm)

NAME

SCGI::Request - the part of the SCGI protocol that reads the environment

SYNOPISIS

  # $request got from SCGI
  $request->read_env;
  
  read $request->connection, my $body, $request->env->{CONTENT_LENGTH};

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 guarantee that there will be a CONTENT_LENGTH for the body of the request in the environment.

public methods

Read the environment in a blocking or non-blocking manner, per parameter to "SCGI-"new>. Returns true if it has finished.
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.
Returns the open connection to the client.
Closes the connection.
Returns true if the connection is 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.

2022-10-13 perl v5.34.0