• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
URLDownload with username and password
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

URLDownload with username and password


  • Subject: URLDownload with username and password
  • From: Miro Jurišić <email@hidden>
  • Date: Tue, 23 Nov 2004 09:01:35 -0500

My code says:

OSStatus err = ::URLDownload(updateURL, const_cast<FSSpec*>(&download.GetFSSpec()), 0, kURLReplaceExistingFlag, 0, 0);

// Prompt for password
if (err == kURLAuthenticationError) {
Str255 username;
Str255 password;


// Prompt for username and password

::URLSetProperty(updateURL, kURLUserName, reinterpret_cast<char*>(&usernamePStr[0]), StrLength(usernamePStr) + 1);
::URLSetProperty(updateURL, kURLPassword, reinterpret_cast<char*>(&passwordPStr[0]), StrLength(passwordPStr) + 1);


::URLDownload(updateURL, const_cast<FSSpec*>(&download.GetFSSpec()), 0, kURLReplaceExistingFlag, 0, 0);
}


but the second call to URLDownload fails with kURLAuthenticationError again. Why? The username and password are correct, as pstrings, and URLSetProperty returns noErr.

Thanks,

meeroh

--

<http://web.meeroh.org/> | KB1FMP

"And when I have understanding of computers, I shall be
        the supreme being!" -- Evil, "Time Bandits"

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: URLDownload with username and password
      • From: Marc Krochmal <email@hidden>
  • Prev by Date: Streamed HTTP POST request - no response if via Proxy
  • Next by Date: Re: Streamed HTTP POST request - no response if via Proxy
  • Previous by thread: Re: Streamed HTTP POST request - no response if via Proxy
  • Next by thread: Re: URLDownload with username and password
  • Index(es):
    • Date
    • Thread