Welcome! Log In Create A New Profile

Advanced

How to make a subrequest from content handler?

kabirova
February 26, 2015 07:44AM
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
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

How to make a subrequest from content handler?

kabirova 698 February 26, 2015 07:44AM

Re: How to make a subrequest from content handler?

Yichun Zhang (agentzh) 417 February 26, 2015 03:10PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 208
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready