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

Lazily initialize request.accept #1209

Merged
merged 1 commit into from
Jun 25, 2018
Merged

Lazily initialize request.accept #1209

merged 1 commit into from
Jun 25, 2018

Conversation

initial-wu
Copy link
Contributor

To save memory consumption.

@codecov
Copy link

codecov bot commented Jun 25, 2018

Codecov Report

Merging #1209 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1209      +/-   ##
==========================================
+ Coverage   99.73%   99.73%   +<.01%     
==========================================
  Files           5        5              
  Lines         383      384       +1     
==========================================
+ Hits          382      383       +1     
  Misses          1        1
Impacted Files Coverage Δ
lib/application.js 100% <ø> (ø) ⬆️
lib/context.js 97.14% <ø> (ø) ⬆️
lib/request.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f047dd...6faa5bf. Read the comment docs.

lib/request.js Outdated
* @return {Object}
* @api public
*/
get accept() {
Copy link
Member

Choose a reason for hiding this comment

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

maybe you should add set accept() to avoid breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've pushed another commit to this PR.

lib/request.js Outdated
* @api public
*/
set accept(obj) {
return this._accept = obj;
Copy link
Member

Choose a reason for hiding this comment

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

need a test case

lib/context.js Outdated
@@ -194,6 +194,7 @@ delegate(proto, 'request')
.access('query')
.access('path')
.access('url')
.access('accpet')
Copy link
Contributor

Choose a reason for hiding this comment

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

Misspelled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thx for reminding, i should have run a test

@initial-wu initial-wu closed this Jun 25, 2018
@initial-wu initial-wu reopened this Jun 25, 2018
@initial-wu
Copy link
Contributor Author

Added some test cases and reorganized the commits. @fl0w @dead-horse

@dead-horse dead-horse merged commit 02feadc into koajs:master Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants