You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Pyeatt, John" <jo...@berbee.com> on 2006/08/02 23:59:54 UTC

[users@httpd] cannot get ap_rvputs() or ap_rprintf() to generate server output in mod_include.

This question is really directed at someone familiar with the C API.
 
I am currently working with a customer that is upgrading from Apache HTTP Server 1.3 to 2.2 on SunOS 5.9.
 
They have made a custom modification to mod_include that they want ported to the 2.2 version.
 
I have been able to get most of the logic into the new version of mod_include just fine and the standard mod_include ssi directives generate output a response to the browser just fine, <!--#printenv --> for example.
 
The part I am now struggling with is getting the thing to actually send the output in the response.
 
In the 1.3 version I could call ap_rvputs() or ap_rprintf() and the output would be sent in the response to the browser just fine.
 
But in 2.2 I am calling something as simple as:
 
len = ap_rprintf(r, "hello world");
 
I do not see this string appear in the browser. Though the value of len does equal 11. So at least to this point the server thinks it sent something.
 
Can anyone familiar with the API for generating output give me a hand? Is there some type of flush function I need to call? Or an init function?
 
------------------------------------------
John Pyeatt
Berbee Information Networks
Phone: 608-288-3000
Cell: 608-658-0871
Email: pyeatt@berbee.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cannot get ap_rvputs() or ap_rprintf() to generate server output in mod_include.

Posted by Nick Kew <ni...@webthing.com>.
On Wednesday 02 August 2006 22:59, Pyeatt, John wrote:

> In the 1.3 version I could call ap_rvputs() or ap_rprintf() and the output
> would be sent in the response to the browser just fine.
>
> But in 2.2 I am calling something as simple as:
>
> len = ap_rprintf(r, "hello world");

That doesn't make sense in a filter.  You use the ap_fprintf(...)
family instead.  But you'll have more than that to deal with in mod_include:
you'd be better off reimplementing your changes than the whole module.

In Apache 1 there were no filters (hence why you couldn't do useful things
like run dynamic or proxied contents through SSI).

Oh, and do order my book:-)

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org