mod_perl logo
perl icon







previous page: Apache::Process - Perl API for XXXpage up: mod_perl APIsnext page: Apache::RequestRec - Perl API for Apache request record accessors


Apache::RequestIO - Perl API for Apache request record IO











Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

By Lincoln Stein, Doug MacEachern
Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolsky, Ken Williams
Practical mod_perl

Practical mod_perl

By Stas Bekman, Eric Cholet


Table of Contents

Synopsis

  use Apache::RequestIO ();

META: to be completed



TOP

Description

Apache::RequestIO provides the API to perform IO on the Apache request object.



TOP

API

Apache::RequestIO provides the following functions and/or methods:



TOP

discard_request_body

META: Autogenerated - needs to be reviewed/completed

In HTTP/1.1, any method can have a body. However, most GET handlers wouldn't know what to do with a request body if they received one. This helper routine tests for and reads any message body in the request, simply discarding whatever it receives. We need to do this because failing to read the request body would cause it to be interpreted as the next request on a persistent connection.

  $ret = $r->discard_request_body();


TOP

setup_client_block

META: Autogenerated - needs to be reviewed/completed

META: I think this method is deprecated along with other client_block methods, use plain $r-<read() instead.

Setup the client to allow Apache to read the request body.

  $ret = $r->setup_client_block($read_policy);


TOP

should_client_block

META: Autogenerated - needs to be reviewed/completed

META: I think this method is deprecated along with other client_block methods, use plain $r-<read() instead.

Determine if the client has sent any data. This also sends a 100 Continue response to HTTP/1.1 clients, so modules should not be called until the module is ready to read content.

  $ret = $r->should_client_block();


TOP

print

Send data to the client.

  $ret = $r->print(@msg);


TOP

read

Read data from the client.

  $read_count = $r->read($buffer, $len, $offset);

META: same as CORE::read, minus the filehandle argument



TOP

rflush

Flush any buffered data to the client.

  $ret = $r->rflush();

Unless $| > 0, data sent via $r->print() is buffered. This method flushes that data to the client.



TOP

sendfile

META: Autogenerated - needs to be reviewed/completed

  $ret = $r->sendfile($filename, $offset, $len);


TOP

write

META: Autogenerated - needs to be reviewed/completed

Write data to the client

  $ret = $r->write($buffer, $bufsiz, $offset);


TOP

TIE Interface



TOP

OPEN

META: Autogenerated - needs to be reviewed/completed

  $ret = OPEN($self, $arg1, $arg2);


TOP

UNTIE

META: Autogenerated - needs to be reviewed/completed

  $ret = $r->UNTIE($refcnt);


TOP

PRINTF

META: Autogenerated - needs to be reviewed/completed

  $ret = PRINTF(...);


TOP

CLOSE

META: Autogenerated - needs to be reviewed/completed

  $ret = $r->CLOSE();


TOP

PRINT

META: Autogenerated - needs to be reviewed/completed

  $ret = PRINT(...);


TOP

BINMODE

META: Autogenerated - needs to be reviewed/completed

  $ret = $r->BINMODE();


TOP

WRITE

META: Autogenerated - needs to be reviewed/completed

  $ret = $r->WRITE($buffer, $bufsiz, $offset);


TOP

TIEHANDLE

META: Autogenerated - needs to be reviewed/completed

  $ret = TIEHANDLE($stashsv, $sv);


TOP

READ

META: Autogenerated - needs to be reviewed/completed

  $ret = $r->READ($buffer, $len, $offset);


TOP

See Also

mod_perl 2.0 documentation.



TOP

Copyright

mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 1.1.



TOP

Authors

The mod_perl development team and numerous contributors.







TOP
previous page: Apache::Process - Perl API for XXXpage up: mod_perl APIsnext page: Apache::RequestRec - Perl API for Apache request record accessors