+ if (output.length != 0) {
+ replen = apr_base64_encode_len(output.length) + 1;
+ reply = apr_pcalloc(req->pool, 10 + replen);
+ if (reply) {
+ memcpy(reply, "Negotiate ", 10);
+ apr_base64_encode(&reply[10], output.value, output.length);
+ reply[replen] = '\0';
+ apr_table_add(req->err_headers_out,
+ "WWW-Authenticate", reply);
+ }
+ } else {
+ apr_table_add(req->err_headers_out,
+ "WWW-Authenticate", "Negotiate");
+ }