How to make a subrequest from content handler?

Hi,


I have a problem when using subrequest in content handler.


The content handler (my_content_handler) calls ngx_http_read_client_request_body with callback handler (my_callback). my_callback() makes a subrequest:


ngx_int_t my_content_handler()

{

    rc = ngx_http_read_client_request_body(r, my_callback);


return rc;

}


void my_callback()

{

ps->handler = my_post_subrequest;

ps->data = ctx;


ngx_http_subrequest(r, ..., ps);

}


void my_post_subrequest()

{

/* required to return back to my_content_handler after completion of subrequest in order to be able to handle resulting response of subrequest */

}


I have 2 questions:

1. how to return back to my_content_handler, if it invokes a subrequest?

2. how to proxy subrequest's response to client?


Thanks in advance!


Best regards,

Kabirova Nailya.



_______________________________________________
nginx-devel mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to