summaryrefslogtreecommitdiff
path: root/daemon/basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/basic.c')
-rw-r--r--daemon/basic.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/daemon/basic.c b/daemon/basic.c
index 1d476ca..fc0a096 100644
--- a/daemon/basic.c
+++ b/daemon/basic.c
@@ -2,6 +2,7 @@
#include "usuals.h"
#include "httpauthd.h"
#include "basic.h"
+#include "stringx.h"
int basic_parse(const char* header, ha_buffer_t* buf, basic_header_t* rec)
{
@@ -10,15 +11,13 @@ int basic_parse(const char* header, ha_buffer_t* buf, basic_header_t* rec)
memset(rec, 0, sizeof(*rec));
- /* Trim the white space */
- while(*header && isspace(*header))
- header++;
-
/*
* Authorization header is in this format:
*
* "Basic " B64(user ":" password)
*/
+
+ header = trim_start(header);
header = (const char*)ha_bufdec64(buf, header, NULL);
if(!header)