Mercurial > hg > nginx
comparison src/http/modules/ngx_http_uwsgi_module.c @ 3555:bc734cf061b0
improve uwsgi_string processing
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 01 Jun 2010 20:24:30 +0000 |
parents | 36b3c1b21544 |
children | b9415935d95d |
comparison
equal
deleted
inserted
replaced
3554:36b3c1b21544 | 3555:bc734cf061b0 |
---|---|
474 | 474 |
475 len += 2 + 5 + header[i].key.len + 2 + header[i].value.len; | 475 len += 2 + 5 + header[i].key.len + 2 + header[i].value.len; |
476 } | 476 } |
477 } | 477 } |
478 | 478 |
479 if (uwcf->uwsgi_string.data && uwcf->uwsgi_string.len) { | 479 len += uwcf->uwsgi_string.len; |
480 len += uwcf->uwsgi_string.len; | |
481 } | |
482 | 480 |
483 #if 0 | 481 #if 0 |
484 /* allow custom uwsgi packet */ | 482 /* allow custom uwsgi packet */ |
485 if (len > 0 && len < 2) { | 483 if (len > 0 && len < 2) { |
486 ngx_log_error (NGX_LOG_ALERT, r->connection->log, 0, | 484 ngx_log_error (NGX_LOG_ALERT, r->connection->log, 0, |
586 *b->last++ = (u_char) ((val_len >> 8) & 0xff); | 584 *b->last++ = (u_char) ((val_len >> 8) & 0xff); |
587 b->last = ngx_copy(b->last, header[i].value.data, val_len); | 585 b->last = ngx_copy(b->last, header[i].value.data, val_len); |
588 } | 586 } |
589 } | 587 } |
590 | 588 |
591 if (uwcf->uwsgi_string.data && uwcf->uwsgi_string.len) { | 589 b->last = ngx_copy(b->last, uwcf->uwsgi_string.data, |
592 b->last = ngx_copy(b->last, uwcf->uwsgi_string.data, | 590 uwcf->uwsgi_string.len); |
593 uwcf->uwsgi_string.len); | |
594 } | |
595 | 591 |
596 if (uwcf->upstream.pass_request_body) { | 592 if (uwcf->upstream.pass_request_body) { |
597 body = r->upstream->request_bufs; | 593 body = r->upstream->request_bufs; |
598 r->upstream->request_bufs = cl; | 594 r->upstream->request_bufs = cl; |
599 | 595 |