Lines Matching refs:r

108     nxt_unit_request_t *r);
109 static void nxt_php_execute(nxt_php_run_ctx_t *ctx, nxt_unit_request_t *r);
932 nxt_unit_request_t *r; in nxt_php_do_301() local
934 r = req->request; in nxt_php_do_301()
937 + r->server_name_length in nxt_php_do_301()
938 + r->local_port_length + 1 in nxt_php_do_301()
939 + r->path_length + 1 in nxt_php_do_301()
940 + r->query_length + 1 in nxt_php_do_301()
946 proto = r->tls ? "https://" : "http://"; in nxt_php_do_301()
948 p = nxt_cpymem(p, nxt_unit_sptr_get(&r->server_name), in nxt_php_do_301()
949 r->server_name_length); in nxt_php_do_301()
951 port = nxt_unit_sptr_get(&r->local_port); in nxt_php_do_301()
952 if (r->local_port_length > 0 in nxt_php_do_301()
953 && !(r->tls && strcmp(port, "443") == 0) in nxt_php_do_301()
954 && !(!r->tls && strcmp(port, "80") == 0)) in nxt_php_do_301()
957 p = nxt_cpymem(p, port, r->local_port_length); in nxt_php_do_301()
960 p = nxt_cpymem(p, nxt_unit_sptr_get(&r->path), r->path_length); in nxt_php_do_301()
963 if (r->query_length > 0) { in nxt_php_do_301()
965 p = nxt_cpymem(p, nxt_unit_sptr_get(&r->query), r->query_length); in nxt_php_do_301()
988 nxt_unit_request_t *r; in nxt_php_request_handler() local
990 r = req->request; in nxt_php_request_handler()
991 target = &nxt_php_targets[r->app_target]; in nxt_php_request_handler()
1000 nxt_php_dynamic_request(&ctx, r); in nxt_php_request_handler()
1008 ctx.chdir = (r->app_target != nxt_php_last_target); in nxt_php_request_handler()
1010 nxt_php_execute(&ctx, r); in nxt_php_request_handler()
1012 nxt_php_last_target = ctx.chdir ? -1 : r->app_target; in nxt_php_request_handler()
1017 nxt_php_dynamic_request(nxt_php_run_ctx_t *ctx, nxt_unit_request_t *r) in nxt_php_dynamic_request() argument
1023 path.length = r->path_length; in nxt_php_dynamic_request()
1024 path.start = nxt_unit_sptr_get(&r->path); in nxt_php_dynamic_request()
1033 ctx->path_info.length = r->path_length - path.length; in nxt_php_dynamic_request()
1102 nxt_php_execute(ctx, r); in nxt_php_dynamic_request()
1112 nxt_php_execute(nxt_php_run_ctx_t *ctx, nxt_unit_request_t *r) argument
1125 SG(request_info).request_uri = nxt_unit_sptr_get(&r->target);
1126 SG(request_info).request_method = nxt_unit_sptr_get(&r->method);
1130 SG(request_info).query_string = r->query.offset
1131 ? nxt_unit_sptr_get(&r->query) : NULL;
1132 SG(request_info).content_length = r->content_length;
1134 if (r->content_type_field != NXT_UNIT_NONE_FIELD) {
1135 f = r->fields + r->content_type_field;
1140 if (r->cookie_field != NXT_UNIT_NONE_FIELD) {
1141 f = r->fields + r->cookie_field;
1146 if (r->authorization_field != NXT_UNIT_NONE_FIELD) {
1147 f = r->fields + r->authorization_field;
1374 nxt_unit_request_t *r; local
1380 r = req->request;
1388 nxt_php_set_sptr(req, "SERVER_PROTOCOL", &r->version, r->version_length,
1403 nxt_php_set_sptr(req, "PHP_SELF", &r->path, r->path_length,
1441 nxt_php_set_sptr(req, "REQUEST_METHOD", &r->method, r->method_length,
1443 nxt_php_set_sptr(req, "REQUEST_URI", &r->target, r->target_length,
1445 nxt_php_set_sptr(req, "QUERY_STRING", &r->query, r->query_length,
1448 nxt_php_set_sptr(req, "REMOTE_ADDR", &r->remote, r->remote_length,
1450 nxt_php_set_sptr(req, "SERVER_ADDR", &r->local_addr, r->local_addr_length,
1453 nxt_php_set_sptr(req, "SERVER_NAME", &r->server_name, r->server_name_length,
1457 if (r->tls) {
1461 f_end = r->fields + r->fields_count;
1462 for (f = r->fields; f < f_end; f++) {
1469 if (r->content_length_field != NXT_UNIT_NONE_FIELD) {
1470 f = r->fields + r->content_length_field;
1476 if (r->content_type_field != NXT_UNIT_NONE_FIELD) {
1477 f = r->fields + r->content_type_field;