Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Documentation for SetBlobPropertiesOptions setters is incorrect #76

Closed
jcookems opened this Issue · 0 comments

1 participant

@jcookems

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.

@jcookems jcookems closed this issue from a commit
Renaud Paquay Remove "empty" overload of setBlobProperties
The method is technically correct, but sort of meaningless, as the
overload with the "Options" parameters always makes more sense.

Fixes #76
a201fa3
@jcookems jcookems closed this in a201fa3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.