I need to get the location header. From what I've read, this should be as simple as
curl_setopt($c, CURLOPT_HEADER, true);
curl_setopt($c, CURLOPT_FOLLOWLOCATION, false);
If I don't include those two options, the curl request works fine, but I'm not able to get the location header.
If I do include those two options, then I get a 401 error.
The Location that is being returned should be a URL that does require an additional login. What am I doing wrong?
If it makes a difference, I'm doing a PUT.
Update: Turns out I was looking too much at the trees and not enough at the forest. When generated the information needed for a response to this question I realized the issue was actually with the call prior to this call.
Before the PUT, I need to get a session token. Since I wasn't parsing out the headers when getting the session token, I was getting a blank session token which was resulting in the 401 for the PUT.