comparison src/http/ngx_http_special_response.c @ 3516:dd1570b6f237

ngx_str_set() and ngx_str_null()
author Igor Sysoev <igor@sysoev.ru>
date Fri, 14 May 2010 09:56:37 +0000
parents a63dd08379c4
children 84905c7b2aa7
comparison
equal deleted inserted replaced
3515:76d252724db5 3516:dd1570b6f237
551 } 551 }
552 552
553 r->err_status = NGX_HTTP_MOVED_TEMPORARILY; 553 r->err_status = NGX_HTTP_MOVED_TEMPORARILY;
554 554
555 location->hash = 1; 555 location->hash = 1;
556 location->key.len = sizeof("Location") - 1; 556 ngx_str_set(&location->key, "Location");
557 location->key.data = (u_char *) "Location";
558 location->value = uri; 557 location->value = uri;
559 558
560 r->headers_out.location = location; 559 r->headers_out.location = location;
561 560
562 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 561 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
606 sizeof(ngx_http_msie_padding) - 1; 605 sizeof(ngx_http_msie_padding) - 1;
607 msie_padding = 1; 606 msie_padding = 1;
608 } 607 }
609 608
610 r->headers_out.content_type_len = sizeof("text/html") - 1; 609 r->headers_out.content_type_len = sizeof("text/html") - 1;
611 r->headers_out.content_type.len = sizeof("text/html") - 1; 610 ngx_str_set(&r->headers_out.content_type, "text/html");
612 r->headers_out.content_type.data = (u_char *) "text/html";
613 r->headers_out.content_type_lowcase = NULL; 611 r->headers_out.content_type_lowcase = NULL;
614 612
615 } else { 613 } else {
616 r->headers_out.content_length_n = -1; 614 r->headers_out.content_length_n = -1;
617 } 615 }
709 + sizeof(ngx_http_msie_refresh_tail) - 1; 707 + sizeof(ngx_http_msie_refresh_tail) - 1;
710 708
711 r->err_status = NGX_HTTP_OK; 709 r->err_status = NGX_HTTP_OK;
712 710
713 r->headers_out.content_type_len = sizeof("text/html") - 1; 711 r->headers_out.content_type_len = sizeof("text/html") - 1;
714 r->headers_out.content_type.len = sizeof("text/html") - 1; 712 ngx_str_set(&r->headers_out.content_type, "text/html");
715 r->headers_out.content_type.data = (u_char *) "text/html";
716 r->headers_out.content_type_lowcase = NULL; 713 r->headers_out.content_type_lowcase = NULL;
717 714
718 r->headers_out.location->hash = 0; 715 r->headers_out.location->hash = 0;
719 r->headers_out.location = NULL; 716 r->headers_out.location = NULL;
720 717