Forum: NGINX nginx module dev question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Delta Y. (Guest)
on 2009-03-25 11:36
(Received via mailing list)
Hi all,
  I want to implement the following feature:
 1. client HEAD request arrive , my module send it to an upstream.
 2. the upstream return response.
 3. my module check the response, if it is not the data I want, send the
origin request to another upstream

 I know the block mode will work. I want to know if there is
asynchronous
mode which will fit into nginx better?

BR,
DeltaY
Yu.Cheung (Guest)
on 2009-04-03 15:00
(Received via mailing list)
I think you can write an upstream module to resolve it.

use the HEAD you get, to make a request, send the new request to the
upstream you want to sent, get the response, check it,

and then you can use ngx_http_internal_redirect£¨£© function to redirect
the origin request to another upstream you defined.

just do it, good luck!



2009/3/25 Delta Y. <removed_email_address@domain.invalid>:
Delta Y. (Guest)
on 2009-04-03 16:19
(Received via mailing list)
Thanks for your suggestion.


2009/4/3 Yu.Cheung <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.