Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.63k stars 5.05k forks source link

Web Site Extension installation returns Bad Request when called without content #2819

Open vludax opened 6 years ago

vludax commented 6 years ago

As suggested by @hovsepm here, Azure SDK calls fail to create site extensions when they attempt to PUT a request with null content. Setting request body to an empty JSON object ({}) fixes the problem.

dsgouda commented 6 years ago

@pavelzel Do you know someone from WebApps who could take a look into this?

vludax commented 6 years ago

Also, not sure if this belongs here or in a separate issue, but the DELETE operation for site extensions returns OK status code, which doesn't match what generated .NET Azure SDK expects (NoContent).

pavelzel commented 6 years ago

@naveedaz Do you know if we've made any updates to the API but haven't yet updated the API spec?

vludax commented 6 years ago

It appears that a new issue has come up in the past few days. Now whenever we attempt to install a site extension via Azure .NET SDK, after a PUT /siteextensions request, the SDK generates a GET /siteextensions/ request, which returns 404, and ultimately results in a failure of the call to install the site extension.

Additionally, there seems to a be a problem retrieving site extensions via SDK's Get and List method (they don't return the extension at all), and attempting to delete an extension just leaves it present on the web app.

dsgouda commented 6 years ago

@pavelzel @naveedaz any updates here

hbuckle commented 5 years ago

@pavelzel @naveedaz - Just hit this issue with the go sdk and resolved in the same way by adding an empty body. Is there any update on resolving it in the specs?

tjrobinson commented 4 years ago

@dsgouda @pavelzel @naveedaz I'm still having problems in 2020. Using api-version=2019-08-01 or api-version=2018-02-01. Even with an empty body, or a {} body I always get a 400 Bad Request back. This is whether I use PowerShell, Postman, or the Try It feature.

List Site Extensions works ok so I'm pretty sure it's not because the rest of my request is invalid (e.g. site name, subscription etc).

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

Issue Details
As suggested by @hovsepm [here](https://github.com/Azure/azure-libraries-for-net/issues/241#issuecomment-378684495), Azure SDK calls fail to create site extensions when they attempt to PUT a request with null content. Setting request body to an empty JSON object (`{}`) fixes the problem.
Author: vludax
Assignees: naveedaz, pavelzel
Labels: `Service Attention`, `Web Apps`
Milestone: -
tjrobinson commented 3 years ago

Thank you for your speedy response!

thecodetinker commented 1 year ago

Hello - what was the follow up please? I've just hit this issue some years later. Thanks!

jonathan-mcewan commented 5 months ago

Still an issue 6 years on. Can we just all agree that 6 years of stability with sending an empty JSON object ({}) is pretty good for Microsoft, and that's the fix for this issue?

thecodetinker commented 5 months ago

No problem with that, so long as that's what the specs say (which should then flow through to fixing any downstream issues, IIUC).