Lines Matching refs:r
12 request_st r; in test_mod_alias_check() local
13 memset(&r, 0, sizeof(request_st)); in test_mod_alias_check()
17 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
18 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/")); in test_mod_alias_check()
19 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
23 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
24 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/")); in test_mod_alias_check()
28 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
29 assert(0 == strcmp(r.physical.basedir.ptr, in test_mod_alias_check()
31 assert(0 == strcmp(r.physical.path.ptr, in test_mod_alias_check()
35 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp/")); in test_mod_alias_check()
36 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/")); in test_mod_alias_check()
39 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
40 assert(0 == strcmp(r.physical.basedir.ptr, "/var/tmp")); in test_mod_alias_check()
41 assert(0 == strcmp(r.physical.path.ptr, "/var/tmp")); in test_mod_alias_check()
43 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
44 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/foo")); in test_mod_alias_check()
48 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
49 assert(0 == strcmp(r.physical.basedir.ptr, "/var/tmp/")); in test_mod_alias_check()
50 assert(0 == strcmp(r.physical.path.ptr, "/var/tmp/")); in test_mod_alias_check()
52 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
53 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/fooddd")); in test_mod_alias_check()
57 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
58 assert(0 == strcmp(r.physical.basedir.ptr, "/var/tmp/")); in test_mod_alias_check()
59 assert(0 == strcmp(r.physical.path.ptr, "/var/tmp/ddd")); in test_mod_alias_check()
63 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
64 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/foo../bad")); in test_mod_alias_check()
68 assert(HANDLER_FINISHED == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
69 assert(403 == r.http_status); in test_mod_alias_check()
70 r.http_status = 0; in test_mod_alias_check()
73 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
74 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/foo/x")); in test_mod_alias_check()
78 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
79 assert(0 == strcmp(r.physical.basedir.ptr, "/opt/var/tmp/")); in test_mod_alias_check()
80 assert(0 == strcmp(r.physical.path.ptr, "/opt/var/tmp/x")); in test_mod_alias_check()
83 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
84 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/foo/x")); in test_mod_alias_check()
88 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
89 assert(0 == strcmp(r.physical.basedir.ptr, "/ba/")); in test_mod_alias_check()
90 assert(0 == strcmp(r.physical.path.ptr, "/ba/x")); in test_mod_alias_check()
93 buffer_copy_string_len(&r.physical.basedir, CONST_STR_LEN("/tmp")); in test_mod_alias_check()
94 buffer_copy_string_len(&r.physical.path, CONST_STR_LEN("/tmp/foo/x")); in test_mod_alias_check()
98 assert(HANDLER_GO_ON == mod_alias_remap(&r, aliases)); in test_mod_alias_check()
99 assert(0 == strcmp(r.physical.basedir.ptr, "/var/tmp/")); in test_mod_alias_check()
100 assert(0 == strcmp(r.physical.path.ptr, "/var/tmp/x")); in test_mod_alias_check()
103 free(r.physical.path.ptr); in test_mod_alias_check()
104 free(r.physical.basedir.ptr); in test_mod_alias_check()