Skip to content

Adding Header Commands To The Download CLI phase #323

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

Merged
merged 6 commits into from
Nov 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
formatting
  • Loading branch information
liorb-canva committed Nov 2, 2023
commit cb0d6b3b02bd99e0ac36d9d3518705a423c32043
2 changes: 0 additions & 2 deletions src/main/kotlin/com/coder/gateway/sdk/CoderCLIManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ class CoderCLIManager @JvmOverloads constructor(
val etag = getBinaryETag()
val conn = remoteBinaryURL.openConnection() as HttpURLConnection
if (settings.headerCommand.isNotBlank()){
// get headers
val headersFromHeaderCommand =CoderRestClient.getHeaders(deploymentURL,settings.headerCommand)
for ((key, value) in headersFromHeaderCommand) {
conn.setRequestProperty(key, value)
Expand All @@ -113,7 +112,6 @@ class CoderCLIManager @JvmOverloads constructor(
conn.setRequestProperty("If-None-Match", "\"$etag\"")
}
conn.setRequestProperty("Accept-Encoding", "gzip")

if (conn is HttpsURLConnection) {
conn.sslSocketFactory = coderSocketFactory(settings)
conn.hostnameVerifier = CoderHostnameVerifier(settings.tlsAlternateHostname)
Expand Down