Do Azure API Mgmt have a length limit on path/parameters?

廉价感情. 提交于 2019-12-23 17:31:15

问题


I have some APIs published in Azure API Management, that call a REST web application behind the scenes. Most of the endpoints use the format:

https://company.azure-api.net/dom/ep/{pathParamVal}?{queryParamName}={queryParamVal}

If {queryParamVal} is a really long string which causes the URL length to exceed 350-400 characters, everything works as expected. But if I specify that same string value as the {pathParamVal}, I get a HTTP 400 error code - HTTP Error 400. The request URL is invalid.. I know this is related to Azure, because the underlying web application works with lengthy path parameters as well as query parameters.

Is there a limitation on how long the URL path can be?


回答1:


Is there a limitation on how long the URL path can be?

Base on my experience, the limition of the WebAPI path is 260 characters that same as the Windows Maximum Path Length Limitation.The Maximum length of URL is limited by the different browsers. More details about the maximum length of a url in different browsers please refer to another SO thread.

Update :

I do a test for it. If the length of pathParamVal >260 then will get the bad request. Or it works correctly. More detail please refer to the screenshots.

  1. If the length of pathParamval >260, then it will get the 400 bad request error.

  1. If the length of pathParamval =260, then it works correctly.



来源:https://stackoverflow.com/questions/42211627/do-azure-api-mgmt-have-a-length-limit-on-path-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!