question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure Functions does not work if length of the request URL (with query-params) is > 2102

See original GitHub issue

I use proxies for a SPA, and to handle OAuth2 authorization code grant flow. When my function app receives a redirect with the code, state, and id_token query params, I was noticing that the function wouldn’t even execute. There is no error in the logs either. So I tested by truncating the value of the query params and it turns out that if the length exceeds 2102, then the routing doesn’t work for some reason.

Investigative information

Note: I have provided information of a normal execution of my function. When the problem occurs, there is actually nothing in the logs that would indicate this problem. Furthermore, Proxy-Trace-Enabled header attribute doesn’t help either because no function has executed.

  • Timestamp: 2018-01-19T05:42:29.349
  • Function App version (1.0 or 2.0-beta): 1.0
  • Function App name:
  • Function name(s) (as appropriate): after-auth
  • Invocation ID: a3df31ab-6fff-4517-b836-7170e245d1bd
  • Region: West US

Repro steps

  1. Create a proxy rule that invokes a function.
  2. Call the function app so that the proxy rule is executed but with query-params with length > 2102.

Expected behavior

After step 2, the proxy rule would be invoked and the function should execute.

Actual behavior

  • Browser receives a 404 Not Found HTTP status code.
  • Proxy rule won’t be executed but instead you will get a response The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Known workarounds

Use the request body instead of query-params.

Related information

  • JS function
  • HttpBinding

EDIT: I wanted to clarify that the length I am talking about is the total length of the URL with the query params, and not just the length of the query params put together. EDIT2: Updated the notes under Actual Behavior.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
safihamidcommented, Jan 31, 2018

@praneetloke I tested this again on a new function app and it’s working for me. can you please send me your function app name, proxies.json and the url your are using? you can email me directly at hamids at microsoft dot com

1reaction
safihamidcommented, Jan 20, 2018

Yes it will land in v1.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Function crashes upon missing url query
It seems the sql will be. SELECT * FROM c WHERE c.uuid = but not. SELECT * FROM c WHERE c.uuid = ""...
Read more >
Azure Functions HTTP trigger
The HTTP request length is limited to 100 MB (104,857,600 bytes), and the URL length is limited to 4 KB (4,096 bytes). These...
Read more >
Azure function requires code query parameter, even if ...
1: Create azure function 2: Add identity provider (I used Microsoft AD) 3: get function url 4: It still requires the code parameter...
Read more >
Is there a maximum length for response content when ...
The HTTP request length is limited to 100 MB (104,857,600 bytes), and the URL length is limited to 4 KB (4,096 bytes). These...
Read more >
How to get parameter binding in Azure Function - isolated ...
We have a lot of Azure Functions that make use of a HttpTrigger. The possible parameters for these functions are passed via a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found