Skip to content

Commit f1811b5

Browse files
authored
Zip Deploy content fix M141 (#8676)
* Update zipDeploy to include content-type (#8671) * bump task version
1 parent af6d484 commit f1811b5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Tasks/AzureRmWebAppDeploymentV4/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"version": {
1919
"Major": 4,
2020
"Minor": 3,
21-
"Patch": 7
21+
"Patch": 8
2222
},
2323
"releaseNotes": "What's new in version 4.* (preview)<br />Supports Kudu Zip Deploy<br />Supports App Service Environments<br />Improved UI for discovering different App service types supported by the task<br/>Click [here](https://aka.ms/azurermwebdeployreadme) for more information.",
2424
"minimumAgentVersion": "2.104.1",

Tasks/AzureRmWebAppDeploymentV4/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"version": {
1919
"Major": 4,
2020
"Minor": 3,
21-
"Patch": 7
21+
"Patch": 8
2222
},
2323
"releaseNotes": "ms-resource:loc.releaseNotes",
2424
"minimumAgentVersion": "2.104.1",

Tasks/Common/azure-arm-rest/azure-arm-app-service-kudu.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export class KuduServiceManagementClient {
1717
this._scmUri = scmUri;
1818
}
1919

20-
public async beginRequest(request: webClient.WebRequest, reqOptions?: webClient.WebRequestOptions): Promise<webClient.WebResponse> {
20+
public async beginRequest(request: webClient.WebRequest, reqOptions?: webClient.WebRequestOptions, contentType?: string): Promise<webClient.WebResponse> {
2121
request.headers = request.headers || {};
2222
request.headers["Authorization"] = "Basic " + this._accesssToken;
23-
request.headers['Content-Type'] = 'application/json; charset=utf-8';
23+
request.headers['Content-Type'] = contentType || 'application/json; charset=utf-8';
2424

2525
let retryCount = reqOptions && util.isNumber(reqOptions.retryCount) ? reqOptions.retryCount : 5;
2626

@@ -445,7 +445,7 @@ export class Kudu {
445445
httpRequest.body = fs.createReadStream(webPackage);
446446

447447
try {
448-
let response = await this._client.beginRequest(httpRequest);
448+
let response = await this._client.beginRequest(httpRequest, null, 'application/octet-stream');
449449
tl.debug(`ZIP Deploy response: ${JSON.stringify(response)}`);
450450
if(response.statusCode == 200) {
451451
tl.debug('Deployment passed');

0 commit comments

Comments
 (0)