From 5f5ce1a79c4061098904a01ff9c9e723e9d6e7b9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 6 May 2013 12:26:25 +0200 Subject: [PATCH] z_HTTP_header_add_basic_auth uses z_HTTP_header_set rather than z_HTTP_header_add, to avoid having two Authorization headers by mistake. --- src/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.c b/src/http.c index 62bfa6f..6f53119 100644 --- a/src/http.c +++ b/src/http.c @@ -191,7 +191,7 @@ void z_HTTP_header_add_basic_auth(ODR o, Z_HTTP_Header **hp, buf = (char *) odr_malloc(o, (len+1) * 8/6 + 12); strcpy(buf, "Basic "); yaz_base64encode(tmp, &buf[strlen(buf)]); - z_HTTP_header_add(o, hp, "Authorization", buf); + z_HTTP_header_set(o, hp, "Authorization", buf); } -- 1.7.10.4