From 5bd7c99eeac7424ac5d0f7e815aee443d36b7abd Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Fri, 16 May 2014 11:41:28 +0300 Subject: [PATCH] Allow space characters in quoted values in HTTP authentication header. Fixes #9. --- lib/auth.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth.coffee b/lib/auth.coffee index d7b1316..fdab312 100644 --- a/lib/auth.coffee +++ b/lib/auth.coffee @@ -7,7 +7,7 @@ exports.parseAuthHeader = (authHeader) -> res['method'] = authHeader.slice(0, i) options = authHeader.slice(i + 1) - regex = /([a-z]+)="([a-zA-Z0-9\/\.@\-,=]+)"/g + regex = /([a-z]+)="([a-zA-Z0-9\/\.@\-,= ]+)"/g while (r = regex.exec(options)) != null res[r[1]] = r[2]