Unverified Commit a00b1f09 authored by twarner-sofi's avatar twarner-sofi Committed by GitHub
Browse files

Support X-Gitlab-Content-Sha256 header (#904)

parent 73f200a8
...@@ -71,6 +71,7 @@ public class RepositoryFileApi extends AbstractApi { ...@@ -71,6 +71,7 @@ public class RepositoryFileApi extends AbstractApi {
RepositoryFile file = new RepositoryFile(); RepositoryFile file = new RepositoryFile();
file.setBlobId(response.getHeaderString("X-Gitlab-Blob-Id")); file.setBlobId(response.getHeaderString("X-Gitlab-Blob-Id"));
file.setCommitId(response.getHeaderString("X-Gitlab-Commit-Id")); file.setCommitId(response.getHeaderString("X-Gitlab-Commit-Id"));
file.setContentSha256(response.getHeaderString("X-Gitlab-Content-Sha256"));
String encoding = response.getHeaderString("X-Gitlab-Encoding"); String encoding = response.getHeaderString("X-Gitlab-Encoding");
file.setEncoding(Constants.Encoding.forValue(encoding)); file.setEncoding(Constants.Encoding.forValue(encoding));
...@@ -515,4 +516,4 @@ public class RepositoryFileApi extends AbstractApi { ...@@ -515,4 +516,4 @@ public class RepositoryFileApi extends AbstractApi {
public Stream<Blame> getBlameStream(Object projectIdOrPath, String filePath, String ref) throws GitLabApiException { public Stream<Blame> getBlameStream(Object projectIdOrPath, String filePath, String ref) throws GitLabApiException {
return (getBlame(projectIdOrPath, filePath, ref, getDefaultPerPage()).stream()); return (getBlame(projectIdOrPath, filePath, ref, getDefaultPerPage()).stream());
} }
} }
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment