summaryrefslogtreecommitdiff
path: root/daemon/basic.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-05-07 22:02:29 +0000
committerStef Walter <stef@memberwebs.com>2004-05-07 22:02:29 +0000
commit80b0e2c0fdad108454ae87130496f595f0b81b81 (patch)
tree696ce7e9010f412ce4e988e4d88553b19e2e42a8 /daemon/basic.c
parent0bc8575dbfb281f5f5e9fb530247d29ba1f296fc (diff)
- Reworked the internal API
- Added common functions for trimming - Debugging - Reworked the module to the new protocol
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)