diff options
author | Jan Pazdziora <jpazdziora@redhat.com> | 2016-01-19 22:28:37 +0100 |
---|---|---|
committer | Jan Pazdziora <jpazdziora@redhat.com> | 2016-01-20 09:46:08 +0100 |
commit | 9c8d405a957063289cefc08ff9b4bb82f831a5a5 (patch) | |
tree | eaec653daf957d104ce6640e5f325767c8bb51e2 | |
parent | 0c36766bdf4aa86c40ae7e466e013f9bafb16001 (diff) | |
download | mod_lookup_identity-9c8d405a957063289cefc08ff9b4bb82f831a5a5.tar.gz mod_lookup_identity-9c8d405a957063289cefc08ff9b4bb82f831a5a5.tar.xz mod_lookup_identity-9c8d405a957063289cefc08ff9b4bb82f831a5a5.zip |
For r->headers_in, underscore mustn't be used.
-rw-r--r-- | mod_lookup_identity.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mod_lookup_identity.c b/mod_lookup_identity.c index b90f7ec..1d6adb3 100644 --- a/mod_lookup_identity.c +++ b/mod_lookup_identity.c @@ -304,14 +304,14 @@ static DBusMessage * lookup_identity_dbus_message(request_rec * r, DBusConnectio } #endif -static void lookup_identity_output_iter_to(request_rec * r, apr_table_t * t, const char * key, const apr_array_header_t * values) { +static void lookup_identity_output_iter_to(request_rec * r, apr_table_t * t, const char * key, const char * sep, const apr_array_header_t * values) { int append = 0; if (key[0] == '+') { key++; append = 1; } long start = 0; - const char * key_n = apr_pstrcat(r->pool, key, "_N", NULL); + const char * key_n = apr_pstrcat(r->pool, key, sep, "N", NULL); if (append) { const char * start_index = apr_table_get(t, key_n); if (start_index) { @@ -319,19 +319,19 @@ static void lookup_identity_output_iter_to(request_rec * r, apr_table_t * t, con } } for (int i = 0; values && i < values->nelts; i++) { - apr_table_setn(t, apr_psprintf(r->pool, "%s_%ld", key, ++start), apr_pstrdup(r->pool, ((char **)values->elts)[i])); + apr_table_setn(t, apr_psprintf(r->pool, "%s%s%ld", key, sep, ++start), apr_pstrdup(r->pool, ((char **)values->elts)[i])); } apr_table_setn(t, key_n, apr_psprintf(r->pool, "%ld", start)); } static void lookup_identity_output_iter(request_rec * r, int the_output, const char * key, const apr_array_header_t * values) { if (the_output & LOOKUP_IDENTITY_OUTPUT_NOTES) { - lookup_identity_output_iter_to(r, r->notes, key, values); + lookup_identity_output_iter_to(r, r->notes, key, "_", values); } if (the_output & LOOKUP_IDENTITY_OUTPUT_ENV) { - lookup_identity_output_iter_to(r, r->subprocess_env, key, values); + lookup_identity_output_iter_to(r, r->subprocess_env, key, "_", values); } if (the_output & LOOKUP_IDENTITY_OUTPUT_HEADERS) { - lookup_identity_output_iter_to(r, r->headers_in, key, values); + lookup_identity_output_iter_to(r, r->headers_in, key, "-", values); } } |