Skip to content
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

Lowerize the params to allow case sensitive #5311

Merged
merged 2 commits into from
Sep 19, 2014

Conversation

manolopm
Copy link
Contributor

Think now it's covered

@yurydelendik
Copy link
Contributor

Make sure all usages of the returned map are lower-cased as well, e.g. at https://github.com/mozilla/pdf.js/blob/master/web/viewer.js#L1772

@manolopm
Copy link
Contributor Author

The preferences should be in lower case to be consistent? or it's better to keep the preferences in camel case?

Manuel Padrón Martínez


Reply to this email directly or view it on GitHub .

@yurydelendik
Copy link
Contributor

The preferences should be in lower case to be consistent? or it's better to keep the preferences in camel case?

After your change the preferences will stop working -- anywhere your code affects that you shall change the case if the preference.

I'm not interested in changing the documentation yet. So they can be in camel case there.

@yurydelendik
Copy link
Contributor

@Rob--W
Copy link
Member

Rob--W commented Sep 19, 2014

If we take http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf as the standard, then most values must be case-insensitive as well.

I suggest to replace hashParams[...] with a function that gets the parameters (e.g. getHashParam), and perhaps another method for some common uses, e.g.getHashParamAsBoolean. Then it will also be easier to supportdisableWorker=1instead ofdisableWorker=true`. Adobe seems to use digits (0 and 1) for boolean parameters, so this change would improve the consistency of our URL format.

yurydelendik added a commit to yurydelendik/pdf.js that referenced this pull request Sep 19, 2014
@yurydelendik yurydelendik merged commit 293d566 into mozilla:master Sep 19, 2014
yurydelendik added a commit that referenced this pull request Sep 19, 2014
@yurydelendik
Copy link
Contributor

Thank you for the patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants