Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for SetBlobPropertiesOptions setters is incorrect #76

Closed
jcookems opened this issue May 17, 2012 · 0 comments
Closed

Documentation for SetBlobPropertiesOptions setters is incorrect #76

jcookems opened this issue May 17, 2012 · 0 comments

Comments

@jcookems
Copy link
Contributor

For example, in the docs for setContentType:

/**
 * Sets the optional MIME content type for the blob content. 
 * This value will be returned to clients in the
 * <code>Content-Type</code> header of the response when
 * the blob data or blob properties are requested. If no
 * content type is specified, the default content type is 
 * <strong>application/octet-stream</strong>.
 * <p>

This is not strictly correct; the service has a default value, but when you use setBlobProperties, the content type header is removed unless the ContentType property is set to the previous value. See http://msdn.microsoft.com/en-us/library/windowsazure/ee691966, which says:

x-ms-blob-content-type
Optional. Sets the blob’s content type.
If this property is not specified on the request, then the property will be cleared for the blob. Subsequent calls to Get Blob Properties (REST API) will not return this property, unless it is explicitly set on the blob again.

It appears the the recommendation for using setBlobProperties should be to first use getBlobProperties, alter it as you like, then submit. Unset properties will clobber server values.

joostdenijs pushed a commit to joostdenijs/azure-sdk-for-java that referenced this issue Jan 18, 2013
jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this issue Apr 5, 2017
lenala pushed a commit to lenala/azure-sdk-for-java that referenced this issue Nov 27, 2018
Fix to make local ECDSA signature encoding compatible with service
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this issue Mar 4, 2019
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this issue May 30, 2019
navalev pushed a commit to navalev/azure-sdk-for-java that referenced this issue Dec 24, 2019
[Spike] Refactor IndexBatchBuilder as fluent builder pattern
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant