comparison src/http/modules/perl/nginx.xs @ 326:9fc4ab6673f9 NGINX_0_6_7

nginx 0.6.7 *) Change: now the paths specified in the "include", "auth_basic_user_file", "perl_modules", "ssl_certificate", "ssl_certificate_key", and "ssl_client_certificate" directives are relative to directory of nginx configuration file nginx.conf, but not to nginx prefix directory. *) Change: the --sysconfdir=PATH option in configure was canceled. *) Change: the special make target "upgrade1" was defined for online upgrade of 0.1.x versions. *) Feature: the "server_name" and "valid_referers" directives support regular expressions. *) Feature: the "server" directive in the "upstream" context supports the "backup" parameter. *) Feature: the ngx_http_perl_module supports the $r->discard_request_body. *) Feature: the "add_header Last-Modified ..." directive changes the "Last-Modified" response header line. *) Bugfix: if an response different than 200 was returned to an request with body and connection went to the keep-alive state after the request, then nginx returned 400 for the next request. *) Bugfix: a segmentation fault occurred in worker process if invalid address was set in the "auth_http" directive. *) Bugfix: now nginx uses default listen backlog value 511 on all platforms except FreeBSD. Thanks to Jiang Hong. *) Bugfix: a worker process may got caught in an endless loop, if an "server" inside "upstream" block was marked as "down"; bug appeared in 0.6.6. *) Bugfix: now Solaris sendfilev() is not used to transfer the client request body to FastCGI-server via the unix domain socket.
author Igor Sysoev <http://sysoev.ru>
date Wed, 15 Aug 2007 00:00:00 +0400
parents 30862655219e
children 3a91bfeffaba
comparison
equal deleted inserted replaced
325:f395c7a4c8a8 326:9fc4ab6673f9
423 423
424 ST(0) = TARG; 424 ST(0) = TARG;
425 425
426 426
427 void 427 void
428 discard_request_body(r)
429 CODE:
430
431 ngx_http_request_t *r;
432
433 ngx_http_perl_set_request(r);
434
435 ngx_http_discard_request_body(r);
436
437
438 void
428 header_out(r, key, value) 439 header_out(r, key, value)
429 CODE: 440 CODE:
430 441
431 ngx_http_request_t *r; 442 ngx_http_request_t *r;
432 SV *key; 443 SV *key;
459 { 470 {
460 r->headers_out.content_length_n = (off_t) SvIV(value); 471 r->headers_out.content_length_n = (off_t) SvIV(value);
461 r->headers_out.content_length = header; 472 r->headers_out.content_length = header;
462 } 473 }
463 474
464 XSRETURN_EMPTY;
465
466 475
467 void 476 void
468 filename(r) 477 filename(r)
469 CODE: 478 CODE:
470 479
586 } 595 }
587 596
588 out: 597 out:
589 598
590 (void) ngx_http_perl_output(r, b); 599 (void) ngx_http_perl_output(r, b);
591
592 XSRETURN_EMPTY;
593 600
594 601
595 void 602 void
596 sendfile(r, filename, offset = -1, bytes = 0) 603 sendfile(r, filename, offset = -1, bytes = 0)
597 CODE: 604 CODE:
675 b->file->fd = fd; 682 b->file->fd = fd;
676 b->file->log = r->connection->log; 683 b->file->log = r->connection->log;
677 684
678 (void) ngx_http_perl_output(r, b); 685 (void) ngx_http_perl_output(r, b);
679 686
680 XSRETURN_EMPTY;
681
682 687
683 void 688 void
684 flush(r) 689 flush(r)
685 CODE: 690 CODE:
686 691
741 ngx_http_request_t *r; 746 ngx_http_request_t *r;
742 747
743 ngx_http_perl_set_request(r); 748 ngx_http_perl_set_request(r);
744 749
745 r->allow_ranges = 1; 750 r->allow_ranges = 1;
746
747 XSRETURN_EMPTY;
748 751
749 752
750 void 753 void
751 unescape(r, text, type = 0) 754 unescape(r, text, type = 0)
752 CODE: 755 CODE:
940 ctx->next = SvRV(ST(2)); 943 ctx->next = SvRV(ST(2));
941 944
942 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 945 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
943 "perl sleep: %d", ctx->sleep); 946 "perl sleep: %d", ctx->sleep);
944 947
945 XSRETURN_EMPTY;
946
947 948
948 void 949 void
949 log_error(r, err, msg) 950 log_error(r, err, msg)
950 CODE: 951 CODE:
951 952
972 } 973 }
973 974
974 p = (u_char *) SvPV(msg, len); 975 p = (u_char *) SvPV(msg, len);
975 976
976 ngx_log_error(NGX_LOG_ERR, r->connection->log, e, "perl: %s", p); 977 ngx_log_error(NGX_LOG_ERR, r->connection->log, e, "perl: %s", p);
977
978 XSRETURN_EMPTY;