Skip to content

Commit eb678e9

Browse files
committed
handle \x again
1 parent fa6e31e commit eb678e9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ngx_postgres_output.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,18 @@ ngx_postgres_output_hex(ngx_http_request_t *r, PGresult *res)
208208
char *value = PQgetvalue(res, 0, 0);
209209

210210
int start = 0;
211+
if (value[start] == '\\')
212+
start++;
211213
if (value[start] == 'x')
212214
start++;
213215

214216
int i = 0;
215217
for (; start < size; start += 2)
216218
*(b->last++) = hex2bin(value + start);
217-
if (b->last != b->end) {
218-
dd("returning NGX_ERROR");
219-
return NGX_ERROR;
220-
}
219+
//if (b->last != b->end) {
220+
// dd("returning NGX_ERROR");
221+
// return NGX_ERROR;
222+
//}
221223

222224
cl->next = NULL;
223225

0 commit comments

Comments
 (0)