From 570c17aa3bb6a39030ebefc5618f0c3fa8cf0089 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sun, 25 Apr 2004 05:50:07 +0000 Subject: Debugging of simple authentication handler --- daemon/httpauthd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'daemon/httpauthd.c') diff --git a/daemon/httpauthd.c b/daemon/httpauthd.c index a2985a3..465ac68 100644 --- a/daemon/httpauthd.c +++ b/daemon/httpauthd.c @@ -68,7 +68,7 @@ const char* kAuthHeaders[] = /* The command definitions */ const httpauth_command_t kCommands[] = { - { "auth", REQTYPE_AUTH, 3, kAuthHeaders }, + { "auth", REQTYPE_AUTH, 4, kAuthHeaders }, { "quit", REQTYPE_QUIT, 0, 0 }, { NULL, -1, -1 } }; @@ -434,6 +434,12 @@ int httpauth_read(int ifd, ha_request_t* req, } } + else + { + req->type = REQTYPE_IGNORE; + return more; + } + /* Check for invalid command */ if(req->type == -1) return more; @@ -734,6 +740,8 @@ int httpauth_processor(int ifd, int ofd) result = 0; break; + case REQTYPE_IGNORE: + break; default: if(httpauth_respond(ofd, HA_SERVER_BADREQ, "Unknown command") == -1) -- cgit v1.2.3