}
else
/* no length and a NULL src pointer! */
- return strdup((char *)"");
+ return strdup("");
buffer = (char*)malloc(length+add);
if(!buffer)
}
/* Setup the proxy-authorization header, if any */
- result = http_output_auth(conn, (char *)"CONNECT", host_port, TRUE);
+ result = http_output_auth(conn, "CONNECT", host_port, TRUE);
if(CURLE_OK == result) {
char *host=(char *)"";
char *host = conn->host.name;
const char *te = ""; /* transfer-encoding */
char *ptr;
- char *request;
+ const char *request;
Curl_HttpReq httpreq = data->set.httpreq;
char *addcookies = NULL;
curl_off_t included_body = 0;
request = data->set.str[STRING_CUSTOMREQUEST];
else {
if(data->set.opt_no_body)
- request = (char *)"HEAD";
+ request = "HEAD";
else {
DEBUGASSERT((httpreq > HTTPREQ_NONE) && (httpreq < HTTPREQ_LAST));
switch(httpreq) {
case HTTPREQ_POST:
case HTTPREQ_POST_FORM:
- request = (char *)"POST";
+ request = "POST";
break;
case HTTPREQ_PUT:
- request = (char *)"PUT";
+ request = "PUT";
break;
default: /* this should never happen */
case HTTPREQ_GET:
- request = (char *)"GET";
+ request = "GET";
break;
case HTTPREQ_HEAD:
- request = (char *)"HEAD";
+ request = "HEAD";
break;
}
}
struct timeval now;
char **allocuserpwd;
- char *userp;
- char *passwdp;
+ const char *userp;
+ const char *passwdp;
struct auth *authp;
struct SessionHandle *data = conn->data;
/* not set means empty */
if(!userp)
- userp=(char *)"";
+ userp="";
if(!passwdp)
- passwdp=(char *)"";
+ passwdp="";
if(!d->nonce) {
authp->done = FALSE;
}
static void
-log_gss_error(struct connectdata *conn, OM_uint32 error_status, char *prefix)
+log_gss_error(struct connectdata *conn, OM_uint32 error_status, const char *prefix)
{
OM_uint32 maj_stat, min_stat;
OM_uint32 msg_ctx = 0;
if(GSS_ERROR(major_status)) {
/* Curl_cleanup_negotiate(conn->data) ??? */
log_gss_error(conn, minor_status,
- (char *)"gss_init_sec_context() failed: ");
+ "gss_init_sec_context() failed: ");
return -1;
}
* Set up lanmanager hashed password
*/
static void mk_lm_hash(struct SessionHandle *data,
- char *password,
+ const char *password,
unsigned char *lmbuffer /* 21 bytes */)
{
unsigned char pw[14];
}
#if USE_NTRESPONSES
-static void utf8_to_unicode_le(unsigned char *dest, const char *src,
+static void ascii_to_unicode_le(unsigned char *dest, const char *src,
size_t srclen)
{
size_t i;
* Set up nt hashed passwords
*/
static CURLcode mk_nt_hash(struct SessionHandle *data,
- char *password,
+ const char *password,
unsigned char *ntbuffer /* 21 bytes */)
{
size_t len = strlen(password);
if(!pw)
return CURLE_OUT_OF_MEMORY;
- utf8_to_unicode_le(pw, password, len);
+ ascii_to_unicode_le(pw, password, len);
#ifdef CURL_DOES_CONVERSIONS
/*
char **allocuserpwd;
/* point to the name and password for this */
- char *userp;
- char *passwdp;
+ const char *userp;
+ const char *passwdp;
/* point to the correct struct with this */
struct ntlmdata *ntlm;
struct auth *authp;
/* not set means empty */
if(!userp)
- userp=(char *)"";
+ userp="";
if(!passwdp)
- passwdp=(char *)"";
+ passwdp="";
#ifdef USE_WINDOWS_SSPI
if (s_hSecDll == NULL) {
char *uc_name = NULL;
int rc;
#ifndef CURL_DISABLE_VERBOSE_STRINGS
- char *tld_errmsg = (char *)"<no msg>";
+ const char *tld_errmsg = "<no msg>";
#else
(void)data;
#endif
#ifndef CURL_DISABLE_VERBOSE_STRINGS
#ifdef HAVE_TLD_STRERROR
if(rc != TLD_SUCCESS)
- tld_errmsg = (char *)tld_strerror((Tld_rc)rc);
+ tld_errmsg = tld_strerror((Tld_rc)rc);
#endif
if(rc == TLD_INVALID)
infof(data, "WARNING: %s; pos %u = `%c'/0x%02X\n",