#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
#include "urldata.h"
-#include "strcase.h"
+#include "rawstr.h"
#include "vauth/vauth.h"
#include "http_digest.h"
/* The last 3 #include files should be in this order */
{
CURLcode result;
struct Curl_easy *data = conn->data;
- unsigned char *path = NULL;
- char *tmp = NULL;
+ unsigned char *path;
+ char *tmp;
char *response;
size_t len;
bool have_chlg;
if(proxy) {
digest = &data->state.proxydigest;
allocuserpwd = &conn->allocptr.proxyuserpwd;
- userp = conn->http_proxy.user;
- passwdp = conn->http_proxy.passwd;
+ userp = conn->proxyuser;
+ passwdp = conn->proxypasswd;
authp = &data->state.authproxy;
}
else {
http://www.fngtps.com/2006/09/http-authentication
*/
- if(authp->iestyle) {
- tmp = strchr((char *)uripath, '?');
- if(tmp) {
- size_t urilen = tmp - (char *)uripath;
- path = (unsigned char *) aprintf("%.*s", urilen, uripath);
- }
+ if(authp->iestyle && ((tmp = strchr((char *)uripath, '?')) != NULL)) {
+ size_t urilen = tmp - (char *)uripath;
+
+ path = (unsigned char *) aprintf("%.*s", urilen, uripath);
}
- if(!tmp)
+ else
path = (unsigned char *) strdup((char *) uripath);
if(!path)