From 80b0e2c0fdad108454ae87130496f595f0b81b81 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 7 May 2004 22:02:29 +0000 Subject: - Reworked the internal API - Added common functions for trimming - Debugging - Reworked the module to the new protocol --- daemon/basic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'daemon/basic.c') 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) -- cgit v1.2.3