Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
o Fix issue with resumable upload on update requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
alainv@google.com committed May 16, 2012
1 parent fbf8f8e commit ed1958f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
6 changes: 5 additions & 1 deletion RELEASE_NOTES.txt
@@ -1,8 +1,12 @@
Google Data API - Release Notes
Notes for v1.47.1
-----------------
o Fix issue with resumable upload on update requests.

Notes for v1.47.0
-----------------
o Use Google Guava library (version 11) instead of google-collections.
o Add OAuth 2.0 support leveraging Google OAuth Client for Java http://code.google.com/p/google-oauth-java-client/).
o Add OAuth 2.0 support leveraging Google OAuth Client for Java (http://code.google.com/p/google-oauth-java-client/).
o Fix date-time format in Audit API's AccountInfo class.
o Update Email Settings API samples to use new filter actions and multple domains.
o Update Provisioning API sample to add support for multi-domain aliases.
Expand Down
Binary file modified java/sample/authsub/dist/authsub_sample.war
Binary file not shown.
14 changes: 0 additions & 14 deletions java/src/com/google/gdata/client/media/MediaService.java
Expand Up @@ -680,27 +680,13 @@ URL createResumableUpdateSession(
URL editMediaUrl, IEntry entry, MediaFileSource file, boolean isMediaOnly)
throws IOException, ServiceException {

/**
* All resumable update requests need to be POST with x-http-method-override
* set to PUT. Set the system property to enable httpoverride.
*/
String methodOverrideProperty = System.getProperty(
HttpGDataRequest.METHOD_OVERRIDE_PROPERTY);
System.setProperty(HttpGDataRequest.METHOD_OVERRIDE_PROPERTY, "true");
GDataRequest request;
if (isMediaOnly) {
request = createRequest(GDataRequest.RequestType.UPDATE, editMediaUrl,
new ContentType(file.getContentType()));
} else {
request = createUpdateRequest(editMediaUrl);
}
if (methodOverrideProperty != null) {
System.setProperty(
HttpGDataRequest.METHOD_OVERRIDE_PROPERTY, methodOverrideProperty);
} else {
System.clearProperty(HttpGDataRequest.METHOD_OVERRIDE_PROPERTY);
}

initResumableMediaRequest(request, file, null);
if (entry.getEtag() != null) {
request.setEtag(entry.getEtag());
Expand Down
2 changes: 1 addition & 1 deletion java/version.properties
Expand Up @@ -24,7 +24,7 @@ youtube.spec.version=2.0
webmastertools.spec.version=2.0

# Implementation version
client.impl.version=1.47.0
client.impl.version=1.47.1
media.impl.version=1.0.2
appsforyourdomain.impl.version=1.3.1
analytics.impl.version=2.3.0
Expand Down

0 comments on commit ed1958f

Please sign in to comment.