VMware Cloud Community
unideskjohn
Contributor
Contributor

Upload file with escaped characters at end of line breaks on 6.7 but work on previous versions

Testing some legacy code on 6.7 I have encountered an issue.  It seems that if there are escaped character at the end of the URL a 404 error is returned on 6.7 however works on previous versions.  For the test environment both vCenter and ESXi are both 6.7, or both are 6.5 no mixed environments.

On 6.5 the datastore is named SSDDemo (2)

https://vcenter65.xxxxxx.com:443/folder/Preparation%20-%20test%2065/prepare-identity-flat.vmdk?dcPat...

This works as expected and the file can be uploaded.

On 6.7 the datastore is named datastore1 (2)

https://vcenter67.xxxxxxx.com:443/folder/Preparation%20-%20cwxtest424b/prepare-identity.vmdk?dcPath=...

On this the server returns a 404 error.

The code that uses the URL is the standard WedReqeust using PUT as shown below

                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpUrl);

                    request.CookieContainer = GetCookieContainer(connectionDetails, sessionManagerReference, connectionTimeout);

                    request.ContentLength = fileLength;

                    request.ContentType = "application/octet-stream";

                    request.Method = "PUT";

Any insights as to what could be happening on 6.7 would be greatly appreciated.

John

Tags (1)
0 Kudos
1 Reply
unideskjohn
Contributor
Contributor

The answer seems to be double escaping the datastore name is not required, or supported, anymore in 6.7.  Does anyone know in which vCenter version this requirement was dropped?

0 Kudos