Helloo,do anyone has this situation?

I compile the nginx with this configure.
–prefix=/home/svn/nginx --user=svn
–add-module=…/ngx_devel_kit-master
–add-module=…/srcache-nginx-module-master
–add-module=…/redis2-nginx-module-master
–add-module=…/set-misc-nginx-module-master
–add-module=…/echo-nginx-module-master
–add-module=…/ngx_http_redis-0.3.7
–add-module=…/lua-nginx-module-0.9.13 --with-debug

I want to use nginx +redis for caching the svn webdav method.
I also patch some code for support the webdav http method,propfind
,but in this situation,it’s not import.

The svn client use chunked encode for http client request .When I use
the TortoiseSVN 1.8.11 to test my cache system.
I get this

read: 21, 00007FFFF1964830, 2048, 131072
2015/04/08 13:08:58 [debug] 16486#0: *1 read: 21, 00007FFFF1964830,
2048, 133120
2015/04/08 13:08:58 [debug] 16486#0: *1 read: 21, 00007FFFF1964830,
2048, 135168
2015/04/08 13:08:58 [debug] 16486#0: *1 read: 21, 00007FFFF1964830,
2048, 137216
2015/04/08 13:08:58 [debug] 16486#0: *1 read: 21, 00007FFFF1964830,
2048, 139264
2015/04/08 13:08:58 [debug] 16486#0: *1 read: 21, 00007FFFF1964830,
2048, 141312
2015/04/08 13:08:58 [debug] 16486#0: *1 read: 21, 00007FFFF1964830,
2048, 143360
2015/04/08 13:08:58 [debug] 16486#0: *1 access phase: 8
2015/04/08 13:08:58 [debug] 16486#0: *1 lua access handler,
uri:"/ps/se/branches" c:1
2015/04/08 13:08:58 [debug] 16486#0: *1 http client request body preread
120
2015/04/08 13:08:58 [debug] 16486#0: *1 http request body chunked filter
2015/04/08 13:08:58 [debug] 16486#0: *1 http body chunked buf t:1 f:0
0000000000746440, pos 0000000000746609, size: 120 file: 0, size: 0 <==
120 IS NOT ENOUGH FOR REQUEST !!!
2015/04/08 13:08:58 [debug] 16486#0: *1 http chunked byte: 31 s:0
2015/04/08 13:08:58 [debug] 16486#0: *1 http chunked byte: 32 s:1
2015/04/08 13:08:58 [debug] 16486#0: *1 http chunked byte: 63 s:1
2015/04/08 13:08:58 [debug] 16486#0: *1 http chunked byte: 0D s:1
2015/04/08 13:08:58 [debug] 16486#0: *1 http chunked byte: 0A s:3
2015/04/08 13:08:58 [debug] 16486#0: *1 http chunked byte: 3C s:4
2015/04/08 13:08:58 [debug] 16486#0: *1 http body chunked buf t:1 f:0
0000000000746440, pos 0000000000746681, size: 0 file: 0, size: 0
2015/04/08 13:08:58 [debug] 16486#0: *1 http body new buf t:1 f:0
000000000074660E, pos 000000000074660E, size: 115 file: 0, size: 0
2015/04/08 13:08:58 [debug] 16486#0: *1 malloc:
00007FD8C33DC010:1048576 <=== SO MALLOC NEW BUF

but ,the (struct ngx_http_request_s) 's write_event_handler will be
set to ngx_http_request_empty_handler.

in ngx_http_request_body.c
function ngx_http_read_client_request_body
r->write_event_handler = ngx_http_request_empty_handler;

It mean nothing will handle the next step,when you read all client
request body!!
I want to know how to take the request body buffer bigger ?
or,can I use this ugly patch to solve this problem?

for struct ngx_http_request_s {

ngx_http_event_handler_pt read_event_handler;
ngx_http_event_handler_pt write_event_handler;
ngx_http_event_handler_pt write_event_handler_back; <===
ADD this

}

it’s ugly but it’s useful.

Hello!

On Thu, Apr 16, 2015 at 06:02:16PM +0800, cruze guo wrote:

[…]

but ,the (struct ngx_http_request_s) 's write_event_handler will be
set to ngx_http_request_empty_handler.

in ngx_http_request_body.c
function ngx_http_read_client_request_body
r->write_event_handler = ngx_http_request_empty_handler;

It mean nothing will handle the next step,when you read all client
request body!!

Write event handler is used to handle write events, and there is no need
to set it unless nginx is writing something. While nginx is reading
a request body, it only needs read event handler to process new data
from a client.


Maxim D.
http://nginx.org/

Ok ,you are right .
in this situation, the nginx must read all client request body, BUT
the next step must be handled will
not continue.

So , I backup the write_event_handler to the write_event_handler_back
and when nginx read all request body I restore the handler.
like this:

write_event_handler = write_event_handler_back;

By changing to this,the next strp can continue. It’s a BUG for nginx?

2015-04-16 21:42 GMT+08:00 Maxim D. [email protected]:

Hello!

On Fri, Apr 17, 2015 at 10:26:14AM +0800, cruze guo wrote:

By changing to this,the next strp can continue. It’s a BUG for nginx?

If you think there is a bug - please provide steps to reproduce
it. For now it looks like you are trying to do something wrong
in your own code.


Maxim D.
http://nginx.org/

pls give me sometime, I will give the detail document
about this “bug”…

2015-04-16 18:02 GMT+08:00 cruze guo [email protected]:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs