Re: Re: How to send a jpeg-file in Handler

2011-01-19 Thread Sorin Manolache
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

Re: Re: How to send a jpeg-file in Handler

2011-01-19 Thread Sorin Manolache
2011/1/19 Whut Jia : > Can I don't use sub-request?? > I want only a single picture to client;Just like the same as sending a text : > r->content_type="text/html"; > ap_rputs("helloworld",r); > return OK; > Please help me ! > Thanks, > ajxs > Try apr_file_t *fd; apr_file_open(&fd, "filename", AP

Re: Re: How to send a jpeg-file in Handler

2011-01-19 Thread Ben Noordhuis
2011/1/19 Whut Jia : > Can I don't use sub-request?? > I want only a single picture to client;Just like the same as sending a text : > r->content_type="text/html"; > ap_rputs("helloworld",r); > return OK; Not sure what you mean. If it's a single static image, convert it to a C byte array and send

Re:Re: How to send a jpeg-file in Handler

2011-01-19 Thread Whut Jia
Can I don't use sub-request?? I want only a single picture to client;Just like the same as sending a text : r->content_type="text/html"; ap_rputs("helloworld",r); return OK; Please help me ! Thanks, ajxs At 2011-01-19 20:22:52,"Ben Noordhuis" wrote: >2011/1/19 Whut Jia : >> I want to return a

Re: How to send a jpeg-file in Handler

2011-01-19 Thread Ben Noordhuis
2011/1/19 Whut Jia : > I want to return a local jpeg-file to client when client request url is > /image/metto .In handler module ,I should how to write?? ap_sub_req_lookup_uri() or ap_sub_req_lookup_file()?

How to send a jpeg-file in Handler

2011-01-19 Thread Whut Jia
Hi all, I want to return a local jpeg-file to client when client request url is /image/metto .In handler module ,I should how to write?? Thanks, ajxs.

Re:Re: How to add a cookie header in response headers when do external redirect?

2011-01-19 Thread Whut Jia
Hello Eric Covener Thank you for your answer.Your are right. At 2011-01-17 20:41:13,"" wrote: >2011/1/17 Whut Jia : >> Hi, >> I want to save accessed uri into response cookie before doing a external >> redirect,according this way below: >> apr_table_setn(r->headers_out,"Location","http://www.