URL Limit- 495 Characters
See original GitHub issueThe PWS is currently limiting URL’s at 495 characters. At this point, I get the following error:
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
return handler.dispatch()
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~url-caster/1.392839177079585096/handlers.py", line 78, in post
output = helpers.BuildResponse(objects)
File "/base/data/home/apps/s~url-caster/1.392839177079585096/helpers.py", line 69, in BuildResponse
siteInfo = GetSiteInfoForUrl(url, distance, force_update)
File "/base/data/home/apps/s~url-caster/1.392839177079585096/helpers.py", line 169, in GetSiteInfoForUrl
siteInfo = FetchAndStoreUrl(siteInfo, url, distance, force_update)
File "/base/data/home/apps/s~url-caster/1.392839177079585096/helpers.py", line 221, in FetchAndStoreUrl
return GetSiteInfoForUrl(final_url, distance, force_update)
File "/base/data/home/apps/s~url-caster/1.392839177079585096/helpers.py", line 166, in GetSiteInfoForUrl
siteInfo = models.SiteInformation.get_by_id(url)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/utils.py", line 160, in positional_wrapper
return wrapped(*args, **kwds)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/model.py", line 3602, in _get_by_id
return cls._get_by_id_async(id, parent=parent, **ctx_options).get_result()
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 383, in get_result
self.check_success()
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 430, in _help_tasklet_along
value = gen.send(val)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/context.py", line 718, in get
mkey = self._memcache_prefix + key.urlsafe()
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/key.py", line 561, in urlsafe
urlsafe = base64.b64encode(self.reference().Encode())
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/key.py", line 546, in reference
namespace=self.__namespace)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/utils.py", line 160, in positional_wrapper
return wrapped(*args, **kwds)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/key.py", line 673, in _ConstructReference
reference = _ReferenceFromPairs(pairs, app=app, namespace=namespace)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/key.py", line 766, in _ReferenceFromPairs
(_MAX_KEYPART_BYTES, idorname))
ValueError: Key name strings must be non-empty strings up to 500 bytes; received http://www.google.com/?bdfuihasdiuyfghuyshfuyagsdhauifhaiuosgfiuashfuijasifugasifaiushjfiuahsufiuasfjasfhuafsdhiufsduihsdfiuhfsdhuifsduhifeshuifsduhifsdiuhsdfuihdsfhiudfsuhidfsuihdfshuidfsiuhdsfhiusdfhiudsfhuidfshiudfshiudfshiudsfhuidfshiudfshuidfsiuhdfsiuhiudfshiufdshuidfshiudfsuhisdfiuhdfhsuiihufdshiudfshiudfshiubdfuihasdiuyfghuyshfuyagsfuhasuifhaiuosgfiuashfuijasifugasifaiushjfiuahsufiuasfjasfhuafsdhiufsduihsdfiuhfsdhuifsduhifeshuifsduhifsdiuhsdfuihdsfhiudfsuhidfsuihdfshuidfsiuhdsfdsdsdasdsad=
This (looks) like it is from the PWS caching service using the URL as the key within the ndb, where the key is limited by 500 characters.
While my example url is a bit ridiculous, 500 seems quite low- we can go up to 2kb through urlfetch
, and most browsers go even higher than that.
Thoughts on how to move forward? I am happy to contribute on this!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:9 (7 by maintainers)
Top Results From Across the Web
What is the character limit on URL [duplicate] - Stack Overflow
This limit applies to both POST request and GET request URLs. If you are using the GET method, you are limited to a...
Read more >Maximum URL length is 2083 characters in Internet Explorer
Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of ......
Read more >What is the best URL length limit for SEO: maximum ... - Serpstat
The appropriate page URL is 75 characters long. As for indexing documents with long URLs (over 75-120 characters), they are generally indexed quite...
Read more >Maximum length of a URL in different browsers - GeeksforGeeks
Google Chrome allows the maximum length of the URL to be of the size 2MB (2,097,152 characters).
Read more >Placeholder.com: Placeholder.com – The Free Image ...
Just specify the image size after our URL (https://via.placeholder.com/) and ... You can use A-Z characters, upper or lowercase, numbers, and most symbols....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@oahziur @mmocny any comment on this?
No hurry! Thanks for offering. I’ll still see if I can take a stab soon.
On Wed, Nov 16, 2016 at 2:45 PM Kevin notifications@github.com wrote: