Open kevinahuber opened 8 years ago
I think @mmocny knows more about the open source PWS.
Doing a quick check, it seems we are not defining a key's property in the data model. Is it possible to define key=ndb.TextPropety()
inside the cache model? Otherwise, we can index the url
field.
@mmocny Do you have any additional guidance on this? I'll go ahead and try to tackle it.
@oahziur @mmocny any comment on this?
@scottjenson @mmocny has there been any movement on this? I'd like for this limit to be upped to ~1000 characters if possible. There are some instances where my URL's are getting very long so I'm using a shortener but they are getting ignored in PhyWeb and Chrome because of the PWS URL character limit. However, Magnet does see these longer urls with their pws and browser so I just wanted to check and see what Chrome was gonna do before I continue with some projects.
Folks, this is a bug in the open source (Python + App Engine) PWS which in this repo.
The URL character length limit for Google's internal PWS is 2083, and that's what is used by Chrome and Nearby), and that is the URL length limit for browsers as well.
I can try to take a stab at fixing the python PWS later this week. Or, maybe someone would like to make a patch? Great opportunity to make a quick contribution!
@mmocny Ah this fell by the wayside. I'd love to tackle this but I am swamped with work this weekend- I can in a few weeks, or can help test if someone else wants to take lead.
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:
@mmocny https://github.com/mmocny Ah this fell by the wayside. I'd love to tackle this but I am swamped with work this weekend- I can in a few weeks, or can help test if someone else wants to take lead.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/google/physical-web/issues/753#issuecomment-261050815, or mute the thread https://github.com/notifications/unsubscribe-auth/AAc8qga2BbzMzeUtJLFORmP5MOae7dqAks5q-11UgaJpZM4JYjqa .
@mmocny @kevinahuber can you guide me as to how I can solve this issue? I am proficient in python and a very quick learner :)
@rohinrohin Excellent! As far as I understand... the PWS stores "site information" using the url as the key. This is an issue, since the key has a limit of 500 characters (this is where my knowledge evaporates). https://github.com/google/physical-web/blob/master/web-service/models.py
We'd want all URLs to have a minimum of 2048 characters, as that is the lowest limit most technologies have.
The PWS is currently limiting URL's at 495 characters. At this point, I get the following error:
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!