+21
-19
lines changedFilter options
+21
-19
lines changed Original file line number Diff line number Diff line change
@@ -44,14 +44,14 @@ ngx_http_redis2_handler(ngx_http_request_t *r)
44
44
/* variables used in the redis2_pass directive */
45
45
46
46
if (ngx_http_complex_value(r, rlcf->complex_target, &target)
47
-
!= NGX_OK)
47
+
!= NGX_OK)
48
48
{
49
49
return NGX_ERROR;
50
50
}
51
51
52
52
if (target.len == 0) {
53
53
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
54
-
"handler: empty \"redis2_pass\" target");
54
+
"handler: empty \"redis2_pass\" target");
55
55
return NGX_HTTP_INTERNAL_SERVER_ERROR;
56
56
}
57
57
@@ -63,7 +63,7 @@ ngx_http_redis2_handler(ngx_http_request_t *r)
63
63
64
64
if (rlcf->upstream.upstream == NULL) {
65
65
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
66
-
"redis2: upstream \"%V\" not found", &target);
66
+
"redis2: upstream \"%V\" not found", &target);
67
67
68
68
return NGX_HTTP_INTERNAL_SERVER_ERROR;
69
69
}
@@ -131,20 +131,20 @@ ngx_http_redis2_create_request(ngx_http_request_t *r)
131
131
} else if (rlcf->literal_query.len == 0) {
132
132
if (rlcf->complex_query == NULL) {
133
133
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
134
-
"no redis2 query specified or the query is empty");
134
+
"no redis2 query specified or the query is empty");
135
135
136
136
return NGX_ERROR;
137
137
}
138
138
139
139
if (ngx_http_complex_value(r, rlcf->complex_query, &query)
140
-
!= NGX_OK)
140
+
!= NGX_OK)
141
141
{
142
142
return NGX_ERROR;
143
143
}
144
144
145
145
if (query.len == 0) {
146
146
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
147
-
"the redis query is empty");
147
+
"the redis query is empty");
148
148
149
149
return NGX_ERROR;
150
150
}
@@ -154,22 +154,24 @@ ngx_http_redis2_create_request(ngx_http_request_t *r)
154
154
155
155
} else {
156
156
if (ngx_http_complex_value(r, rlcf->complex_query_count,
157
-
&query_count) != NGX_OK)
157
+
&query_count)
158
+
!= NGX_OK)
158
159
{
159
160
return NGX_ERROR;
160
161
}
161
162
162
163
if (query_count.len == 0) {
163
164
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
164
-
"the N argument to redis2_raw_queries is empty");
165
+
"the N argument to redis2_raw_queries is empty");
165
166
166
167
return NGX_ERROR;
167
168
}
168
169
169
170
n = ngx_atoi(query_count.data, query_count.len);
170
171
if (n == NGX_ERROR || n == 0) {
171
172
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
172
-
"the N argument to redis2_raw_queries is invalid");
173
+
"the N argument to redis2_raw_queries is "
174
+
"invalid");
173
175
174
176
return NGX_ERROR;
175
177
}
Original file line number Diff line number Diff line change
@@ -211,10 +211,10 @@ ngx_http_redis2_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
211
211
(size_t) ngx_pagesize);
212
212
213
213
ngx_conf_merge_bitmask_value(conf->upstream.next_upstream,
214
-
prev->upstream.next_upstream,
215
-
(NGX_CONF_BITMASK_SET
216
-
|NGX_HTTP_UPSTREAM_FT_ERROR
217
-
|NGX_HTTP_UPSTREAM_FT_TIMEOUT));
214
+
prev->upstream.next_upstream,
215
+
(NGX_CONF_BITMASK_SET
216
+
|NGX_HTTP_UPSTREAM_FT_ERROR
217
+
|NGX_HTTP_UPSTREAM_FT_TIMEOUT));
218
218
219
219
if (conf->upstream.next_upstream & NGX_HTTP_UPSTREAM_FT_OFF) {
220
220
conf->upstream.next_upstream = NGX_CONF_BITMASK_SET
@@ -395,7 +395,7 @@ ngx_http_redis2_raw_queries(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
395
395
/* compile the N argument */
396
396
397
397
rlcf->complex_query_count = ngx_palloc(cf->pool,
398
-
sizeof(ngx_http_complex_value_t));
398
+
sizeof(ngx_http_complex_value_t));
399
399
400
400
if (rlcf->complex_query_count == NULL) {
401
401
return NGX_CONF_ERROR;
@@ -413,7 +413,7 @@ ngx_http_redis2_raw_queries(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
413
413
/* compile the CMDS argument */
414
414
415
415
rlcf->complex_query = ngx_palloc(cf->pool,
416
-
sizeof(ngx_http_complex_value_t));
416
+
sizeof(ngx_http_complex_value_t));
417
417
418
418
if (rlcf->complex_query == NULL) {
419
419
return NGX_CONF_ERROR;
Original file line number Diff line number Diff line change
@@ -65,15 +65,15 @@ ngx_http_redis2_upstream_add(ngx_http_request_t *r, ngx_url_t *url)
65
65
66
66
if (uscfp[i]->host.len != url->host.len
67
67
|| ngx_strncasecmp(uscfp[i]->host.data, url->host.data,
68
-
url->host.len) != 0)
68
+
url->host.len) != 0)
69
69
{
70
70
dd("upstream_add: host not match");
71
71
continue;
72
72
}
73
73
74
74
if (uscfp[i]->port != url->port) {
75
75
dd("upstream_add: port not match: %d != %d",
76
-
(int) uscfp[i]->port, (int) url->port);
76
+
(int) uscfp[i]->port, (int) url->port);
77
77
continue;
78
78
}
79
79
@@ -203,8 +203,8 @@ ngx_http_redis2_build_query(ngx_http_request_t *r, ngx_array_t *queries,
203
203
204
204
if (p - (*b)->pos != (ssize_t) len) {
205
205
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
206
-
"redis2: redis2_query buffer error %uz != %uz",
207
-
(size_t) (p - (*b)->pos), len);
206
+
"redis2: redis2_query buffer error %uz != %uz",
207
+
(size_t) (p - (*b)->pos), len);
208
208
209
209
return NGX_ERROR;
210
210
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4