X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp.c;h=0fb1434c37d3d0f0a24fd389e5038dd5165b3adb;hb=dbd362a3dc1cfcafbcbafee0d5b28a4397fe7f03;hp=4362c757a85d305bdf8ac67406a36808d2259572;hpb=88d3bedf772316f87e1996f655ccf8d1e2589755;p=yaz-moved-to-github.git diff --git a/src/http.c b/src/http.c index 4362c75..0fb1434 100644 --- a/src/http.c +++ b/src/http.c @@ -1,12 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ - /** * \file http.c * \brief Implements HTTP decoding */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -231,6 +233,8 @@ void z_HTTP_header_add_basic_auth(ODR o, Z_HTTP_Header **hp, if (username == 0) return; + if (password == 0) + password = ""; len = strlen(username) + strlen(password); tmp = (char *) odr_malloc(o, len+2);