Welcome! Log In Create A New Profile

Advanced

Re[6]: обработка POST & NGX_AGAIN

December 01, 2009 02:34AM
сделал так, все работает, проходит тестирование:

// хандленр фазы
ngx_http_memcacheset_phase_handler( ngx_http_request_t *r ){
ngx_init_t rc=NGX_OK;

if(r->request_body == NULL) {
rc = ngx_http_read_client_request_body(r, ngx_http_body_handler);

if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
return rc;
}

return NGX_DONE;
}

if(r->request_body->rest) {
return NGX_DONE;
}

return rc;
} // end phase handler

//боди хандлер
ngx_http_memcacheset_body_handler( ngx_http_request_t *r ){

ngx_int_t rc;

rc = ngx_http_memcacheset_phase_handler(r);

if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
ngx_http_finalize_request(r, rc);
}

ngx_http_finalize_request(r, 0);

}


// контент хандлер
ngx_http_memcacheset_handler( ngx_http_request_t *r ){

.....

r->request_body_in_file_only = 0;
r->request_body_in_single_buf=1;

rc = ngx_http_read_client_request_body( r, ngx_http_memcacheset_body_handler);

иногда rc=NGX_AGAIN
}


Спасибо Валерию Холодкову за советы

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

обработка POST & NGX_AGAIN

akalend November 30, 2009 04:28AM

Re: обработка POST & NGX_AGAIN

Valery Kholodkov November 30, 2009 05:20AM

Re[2]: обработка POST & NGX_AGAIN

akalend November 30, 2009 05:50AM

Re: Re[2]: обработка POST & NGX_AGAIN

Valery Kholodkov November 30, 2009 06:10AM

Re[4]: обработка POST & NGX_AGAIN

akalend November 30, 2009 08:02AM

Re: Re[4]: обработка POST & NGX_AGAIN

Valery Kholodkov November 30, 2009 08:42AM

Re[6]: обработка POST & NGX_AGAIN

akalend November 30, 2009 08:48AM

Re[6]: обработка POST & NGX_AGAIN

akalend November 30, 2009 08:56AM

Re: Re[4]: обработка POST & NGX_AGAIN

Valery Kholodkov November 30, 2009 08:48AM

Re[6]: обработка POST & NGX_AGAIN

akalend November 30, 2009 08:50AM

Re[6]: обработка POST & NGX_AGAIN

akalend December 01, 2009 02:34AM

Re[7]: обработка POST & NGX_AGAIN

akalend December 01, 2009 04:20AM

скрыть заголовок Server

akalend December 09, 2009 06:00AM

Re: скрыть заголовок Server

Peter Vereshagin December 09, 2009 06:14AM

Re[2]: скрыть заголовок Server

akalend December 09, 2009 06:24AM

Re: скрыть заголовок Server

Евгений Девятых December 09, 2009 06:28AM

Re[2]: скрыть заголовок Server

akalend December 09, 2009 07:56AM

Re: Re[2]: скрыть заголовок Server

Boris Dolgov December 09, 2009 08:20AM

Re: Re[2]: скрыть заголовок Server

Alex, the Marrch Ca'at December 09, 2009 08:28AM

Re: обработка POST & NGX_AGAIN

Igor Sysoev November 30, 2009 05:52AM

Re[2]: обработка POST & NGX_AGAIN

akalend November 30, 2009 06:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready