httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <>
Subject Re: Re: How to send a jpeg-file in Handler
Date Wed, 19 Jan 2011 15:46:16 GMT
2011/1/19 Whut  Jia <>:
> Hi Sorin Manolache,
> According your ways(ap_send_fd()),it is work.The picture is returned to client.But myself-set
cookie content are not returned , why??
> Begin sending jpg-file,I set a cookie in headers_out :
> r->content_type="image/jpeg";
> apr_table_setn(r->headers_out,"Set-Cookie",cookie-contence);
> ap_send_fd(fd, request, 0, file_size, &bytes_sent);
> return OK;
> Besides,the request address of the jpeg picture is
This request is sent from the response page of a
request .
> Thanks,
> ajxs

I don't know why the cookie is not sent.

Try apr_table_set(r->err_headers_out, ...);

Also, are you sure that the pointer to cookie_contents is still valid
at the very end of the request processing, that is _after_ you return
from the handler. If not, try apr_table_set instead of apr_table_setn.


View raw message