-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request URL length <= 2000 checking does not escape '
#1246
Comments
Example fiddle: https://jsfiddle.net/t9onha6p/ The request URL sent out is
Which has 2329 characters. |
esri-leaflet does call Which in your case if the browser does escape those characters, the calculated url length will not be correct. I agree with you that this is probably an issue. I'm not quite sure what to use if not If all browsers encoded the apostrophe, we could just replace it with
|
I think escaping p.s The request is failing completely in this case because it's apparently common to limit maximum URL length to 2048 characters:
|
That seems reasonable to me - thanks for sharing your perspective. Unless any other maintainers have concerns, I'd be willing to accept a PR that implements the apostrophe encoding in the length calculation. |
Fixed in v3.0.12. |
Tested on Leaflet 1.7.1, Esri Leaflet 2.5.1.
I've encountered a issue where a request to a Feature layer through resource proxy would fail with 404 error when filter condition reaches specific length. Looking at #983, I found that
Request.js
is calculating the length of the request to be less than the actual length, and it just so happens hit the 2000 (probably 2048?) character limit so it's incorrectly using GET request, which caused the fail.https://github.com/Esri/esri-leaflet/blob/master/src/Request.js#L121
With a debugger I see that
paramString
did not escape'
to%27
while the actual request URL would, hence under-estimating the URL length.The text was updated successfully, but these errors were encountered: