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

Set returnValues.suggestedLength to Content-Length if integer #10133

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

kevinleedrum
Copy link
Contributor

Fixes #9103 by setting returnValues.suggestedLength to the value of Content-Length (provided it is an integer) even if returning early.

@kevinleedrum kevinleedrum changed the title set returnValues.suggestedLength to Content-Length if integer Set returnValues.suggestedLength to Content-Length if integer Oct 5, 2018
@timvandermeij
Copy link
Contributor

Looks good. Could you squash the commits into one for review? Refer to https://github.com/mozilla/pdf.js/wiki/Squashing-Commits for how to do that easily if you're not familiar with the process.

@Snuffleupagus
Copy link
Collaborator

What about the final point from #9103 (comment), is that not necessary after all?

[...] so perhaps it makes sense to unconditionally use the value of the Content-Length header (unless Transfer-Encoding is specified but not starting with identity).

@kevinleedrum
Copy link
Contributor Author

What about the final point from #9103 (comment), is that not necessary after all?

[...] so perhaps it makes sense to unconditionally use the value of the Content-Length header (unless Transfer-Encoding is specified but not starting with identity).

I believe the Content-Length should not be present anyway if Transfer-Encoding is specified. https://tools.ietf.org/html/rfc7230#section-3.3.2

@timvandermeij
Copy link
Contributor

@Rob--W Time permitting, would you be willing to review this?

@timvandermeij timvandermeij requested a review from Rob--W October 7, 2018 13:55
Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general. The defaultValues variable in the test is now used only once, and it would make more sense to replace that only use with the value itself.

@kevinleedrum
Copy link
Contributor Author

The defaultValues variable in the test is now used only once, and it would make more sense to replace that only use with the value itself.

Done. 👍

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change. This is good to merge if the tests pass.

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Linux m4)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/e1a315c8925abcf/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.215.176.217:8877/4389d3f37ae906b/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/e1a315c8925abcf/output.txt

Total script time: 19.58 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/4389d3f37ae906b/output.txt

Total script time: 23.97 mins

  • Font tests: FAILED
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.215.176.217:8877/4389d3f37ae906b/reftest-analyzer.html#web=eq.log

@timvandermeij
Copy link
Contributor

/botio-windows fonttest

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Windows)


Received

Command cmd_fonttest from @timvandermeij received. Current queue size: 0

Live output at: http://54.215.176.217:8877/1145fa4cfe6ddd7/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/1145fa4cfe6ddd7/output.txt

Total script time: 2.82 mins

  • Font Tests: Passed

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/2ebf18b0b05d201/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 8, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2ebf18b0b05d201/output.txt

Total script time: 2.86 mins

Published

@timvandermeij timvandermeij merged commit f45e46d into mozilla:master Oct 8, 2018
@timvandermeij
Copy link
Contributor

Thank you!

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.

5 participants