Welcome! Log In Create A New Profile

Advanced

Re: what does the "main" pointor in request struct mean?

May 28, 2010 02:19AM
Igor Sysoev Wrote:
-------------------------------------------------------
> On Thu, May 27, 2010 at 02:55:57AM -0400, 4everpan
> wrote:
>
> > I found in Nginx that:
> > struct ngx_http_request_s {
> > ...
> > ngx_http_request_t *main;
> > ...
> > };
> > what does this argument mean?
> >
> > I also found a similar argument in Apache:
> > request_rec* request_rec::main
> > //Pointer to the main request if this is a
> sub-request (see http_request.h)
> >
> > so,
> > Do they have the same meaning?
> > and if yes, what dose a main request and a
> sub-request mean? What's the difference between
> the 2 http requests?
>
> Yes, this is the same as in Apache.
> Subrequests are requests made inside a request,
> for example, in SSI:
>
> <!--# include virtual="/header.html" -->
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx


It's really a surprise for me that Igor Sysoev answered my first question in our forum! \(^o^)/~

But I'm not familiar with SSI or shtml protocal... So... let me think about it:
When I enter the URL "http://www.g.cn" into IE, the URL will be redirected to "http://www.google.cn" such as follows:

Started Time Sent Received Method Result Type URL
+ 0.000 0.134 406 532 GET 301 Redirect to http://www.google.cn/webhp?source=g_cn http://www.g.cn/

Dose the GET of URL"http://www.google.cn/webhp?source=g_cn" is a sub-request of the GET of URL"http://www.g.cn/"?
Subject Author Posted

what does the "main" pointor in request struct mean?

4everpan May 27, 2010 02:55AM

Re: what does the "main" pointor in request struct mean?

Igor Sysoev May 27, 2010 04:22AM

Re: what does the "main" pointor in request struct mean?

vesperto May 27, 2010 04:44AM

Re: what does the "main" pointor in request struct mean?

Igor Sysoev May 27, 2010 05:02AM

Re: what does the "main" pointor in request struct mean?

4everpan May 28, 2010 02:19AM

Re: what does the "main" pointor in request struct mean?

agentzh May 28, 2010 04:56AM

Re: what does the "main" pointor in request struct mean?

4everpan May 28, 2010 06:03AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 308
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