Well, in further poking around I’ve gotten this to work. I’ve removed the DPoP header entirely from the PUT request and this is now working. My test debugging output follows. Somehow the ESS doesn’t require a DPoP proof. And if you give it the request fails, at least with my setup.
[2021-09-25T15:43:41.329Z] [DEBUG] [SolidCreds+CloudStorage+Requests.swift:221 request(path:httpMethod:body:headers:accessTokenAutoRefresh:completion:)] Request: method: PUT
[2021-09-25T15:43:41.329Z] [DEBUG] [SolidCreds+CloudStorage+Requests.swift:222 request(path:httpMethod:body:headers:accessTokenAutoRefresh:completion:)] Request: url.host: pod.inrupt.com
[2021-09-25T15:43:41.329Z] [DEBUG] [SolidCreds+CloudStorage+Requests.swift:223 request(path:httpMethod:body:headers:accessTokenAutoRefresh:completion:)] Request: Request headers: Optional([“Content-Type”: “text/plain”, “Authorization”: “DPoP [Snipped-- Was the access token]”, “Host”: “pod.inrupt.com”, “Link”: “http://www.w3.org/ns/ldp#Resource; rel="type"”])
[2021-09-25T15:43:41.330Z] [DEBUG] [SolidCreds+CloudStorage+Requests.swift:224 request(path:httpMethod:body:headers:accessTokenAutoRefresh:completion:)] Request: URL: https://pod.inrupt.com/crspybits/9400A867-9403-489E-B2A3-BF7F604517B3/F311C833-FF7E-4BAA-89D7-78A942B7B1AF.txt
[2021-09-25T15:43:42.033Z] [DEBUG] [SolidCreds+CloudStorage+Extras.swift:145 uploadFile(named:inDirectory:data:mimeType:completion:)] Success Response: Data: Headers: [AnyHashable(“Connection”): “keep-alive”, AnyHashable(“Content-Length”): “0”, AnyHashable(“Date”): “Sat, 25 Sep 2021 15:43:41 GMT”, AnyHashable(“Strict-Transport-Security”): “max-age=15724800; includeSubDomains”, AnyHashable(“Content-Location”): “https://pod.inrupt.com/crspybits/9400A867-9403-489E-B2A3-BF7F604517B3/F311C833-FF7E-4BAA-89D7-78A942B7B1AF.txt”, AnyHashable(“Link”): “http://www.w3.org/ns/ldp#Resource; rel="type", http://www.w3.org/ns/ldp#NonRDFSource; rel="type", </crspybits/9400A867-9403-489E-B2A3-BF7F604517B3/F311C833-FF7E-4BAA-89D7-78A942B7B1AF.txt?ext=shex>; rel="Shape Expression Vocabulary”, </powerswitch/crspybits>; rel="https://inrupt.com/ns/ess#hasPowerSwitch\“, https://pod.inrupt.com/crspybits/9400A867-9403-489E-B2A3-BF7F604517B3/F311C833-FF7E-4BAA-89D7-78A942B7B1AF.txt?ext=description; rel="describedby", </crspybits/9400A867-9403-489E-B2A3-BF7F604517B3/F311C833-FF7E-4BAA-89D7-78A942B7B1AF.txt?ext=acr>; rel="http://www.w3.org/ns/solid/acp#accessControl\”, http://www.w3.org/ns/solid/acp#Read; rel="http://www.w3.org/ns/solid/acp#allow\“, http://www.w3.org/ns/solid/acp#Write; rel="http://www.w3.org/ns/solid/acp#allow\”"]
Status Code: 201
Test Case ‘GeneralTests.testUploadNewFile_NewDirectory’ passed (1.634 seconds)
And so you can see the evidence of the successful creation of the new folder in the Pod browser:
