Has anyone some ideas?
I tried in this way:
static int get_socketclient(request_rec *r)
{
apr_os_sock_t cl_fd;
conn_rec *conn = r->connection;
apr_socket_t *csd = ((core_net_rec
*)conn->input_filters->ctx)->client_socket;
apr_os_sock_get(&cl_fd, csd);
return (int)cl_fd;
}
In my handler:
....
ap_set_content_type(r, "text/html");
xsltSaveResultToFd(get_socketclient(r), res, (tipo_xslt) ?
sconf->aziende : sconf->web);
The problem is that the output starts with some html code and then I
have the response headers and then nothing else.....
Some ideas?
Best regards
Marco Spinetti ha scritto:
> I'd like to know if it's possibile to write directly to the client.
> Actually in my module handler (apache 2.2) I have:
>
> ap_set_content_type(r, "text/html");
> ap_rwrite(bufptr, size, r);
> ap_rflush(r);
> ....
>
> where bufptr is obtained by libxslt xsltSaveResultToString.
> Because it's possibile to write the output of the transform to stdout
> directly, I'd like to know if I could delete the bufptr creation.
> The libxml2 function to write to stdout is:
>
> xsltSaveResultToFile(stdout, ....);
>
> So could I write in my module something like this below?
> ap_set_content_type(r, "text/html");
> xsltSaveResultToFile(stdout, ....);
> .....
>
> Best regards
> Marco
>
>
>
|