Skip to content

Commit e0281f1

Browse files
authored
---
yaml --- r: 9687 b: refs/heads/master c: d393252 h: refs/heads/master i: 9685: 36988e8 9683: 6026922 9679: c73e30e
1 parent 0353995 commit e0281f1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: cd9d226828e716dd1c71ff317a52b78fe342fef5
2+
refs/heads/master: d39325260d19dd274d33ec51b239c230803b7cb0
33
refs/heads/travis: 47e4fee4fd5af9b2a8ce46f23c72ec95f9b195b2
44
refs/heads/gh-pages: e04ec732e2dd43f0ebc9921f3a6291b50c820e3a
55
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

trunk/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,10 @@ public String open(StorageObject object, Map<Option, ?> options) {
717717
GenericUrl url = req.buildHttpRequest().getUrl();
718718
String scheme = url.getScheme();
719719
String host = url.getHost();
720+
int port = url.getPort();
721+
port = port < 0 ? port : url.toURL().getDefaultPort();
720722
String path = "/upload" + url.getRawPath();
721-
url = new GenericUrl(scheme + "://" + host + path);
723+
url = new GenericUrl(scheme + "://" + host + ":" + port + path);
722724
url.set("uploadType", "resumable");
723725
url.set("name", object.getName());
724726
for (Option option : options.keySet()) {

0 commit comments

Comments
 (0)