From 9996856698d27510299a4ef23a2710cf8881cc9c Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Wed, 16 Oct 2019 11:29:07 +0300 Subject: [PATCH] Send Basic vs basic for Basic HTTP auth to deal with reportedly broken implementation --- src/auth.c | 2 +- src/proxy.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/auth.c b/src/auth.c index f34b20b..7a3e79f 100644 --- a/src/auth.c +++ b/src/auth.c @@ -55,7 +55,7 @@ int clientnegotiate(struct chain * redir, struct clientparam * param, struct soc len += sprintf((char *)buf + len, ":%hu HTTP/1.0\r\nConnection: keep-alive\r\n", ntohs(*SAPORT(addr))); if(user){ - len += sprintf((char *)buf + len, "Proxy-authorization: basic "); + len += sprintf((char *)buf + len, "Proxy-authorization: Basic "); sprintf((char *)username, "%.128s:%.128s", user, pass?pass:(unsigned char *)""); en64(username, buf+len, (int)strlen((char *)username)); len = (int)strlen((char *)buf); diff --git a/src/proxy.c b/src/proxy.c index 16565f7..43e1d26 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -92,7 +92,7 @@ char * proxy_stringtable[] = { #ifndef NOCRYPT "Proxy-Authenticate: NTLM\r\n" #endif - "Proxy-Authenticate: basic realm=\"proxy\"\r\n" + "Proxy-Authenticate: Basic realm=\"proxy\"\r\n" "Connection: close\r\n" "Content-type: text/html; charset=utf-8\r\n" "\r\n" @@ -118,7 +118,7 @@ char * proxy_stringtable[] = { "