question

FilipZan-5163 avatar image
1 Vote"
FilipZan-5163 asked FilipZan-5163 edited

Azure Functions PUT HTTP trigger endpoint not triggered

I have HTTP trigger endpoint defined:

{
  "generatedBy": "Microsoft.NET.Sdk.Functions-3.0.11",
  "configurationSource": "attributes",
  "bindings": [
    {
      "type": "httpTrigger",
      "route": "{driverId}",
      "methods": [
        "post",
        "put"
      ],
      "authLevel": "function",
      "name": "reqeust"
    }
  ],
  "disabled": false,
  "scriptFile": "whatever.dll",
  "entryPoint": "Whatever.PutDriverFunction.Run"
}

When I Run POST method everything is OK. 400 is due to empty body:
85314-image.png

So instead of POST I use PUT - same function key, body, route params, headers, etc:
85862-image.png

No actual code defined is triggerd, nothing appears in Application Instights, just like it was not triggered at all.
There is no difference in request handling in code based on verbs. When I run locally everything works fine.
The PUT has been working for some time until recently.


The both above used master key, if I change to any other key than master, POST still works OK.
But PUT behaves totally wierd.
When function key is used response is 401
When host key is used response is 403.

Is this a bug/change in runtime or something that I'm doing wrong, that PUT does not work as expected?


azure-functions
image.png (103.2 KiB)
image.png (79.2 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'm also experiencing this issue. We have a number of function apps running on the 2.X runtime which suddenly started failing this week.
PUTS only "run" when using the _master host key but don't appear to execute.
Calls to PUTS return a 202 Accepted along with (what looks like) an automated response indicating the status has "started".


1 Vote 1 ·

@FilipZan-5163 I have performed a quick test with the post and put HTTP method and couldn't observe the same issue as you have mentioned.
In application insights, I can see the below logs for my PUT request.

85239-image.png

Can you please provide more details to my private comment?

0 Votes 0 ·
image.png (15.2 KiB)

We are experiencing the same issue as well. And it is only affecting one function. GETs work but we are getting a 403 on PUTs. It has been working until around 4/3. Did something change?

0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered FilipZan-5163 edited

@FilipZan-5163 @ChrisWhiting-3525 @rogerchang-6625 @TimMyers-5847

Apology for the delay and any inconvenience with this issue. The product team has updated the code to fix this issue: https://github.com/Azure/azure-functions-host/pull/7270 and the fix will start deploying soon.

You can watch the app service announcement repo to receive notification about new version releases: https://github.com/Azure/app-service-announcements/issues

The workaround would be to pin it to version 3.0.15406: https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings#functions_extension_version

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sweet,
I'll keep this thread as not answered, until we confirm that fix is deployed, just in case.
Thanks!

0 Votes 0 ·