Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Issue 11359085: Refactor HTTP parser to hold current buffer (Closed)

Created:
8 years, 1 month ago by Søren Gjesse
Modified:
8 years, 1 month ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Refactor HTTP parser to hold current buffer The HTTP parser now stores the current buffer internally. This change is to prepare for stopping the parser when a request have been received and resuming parsing when this response have been fully processed. R=ager@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=14623

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed review commetns #

Total comments: 2

Patch Set 3 : Addressed more comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -43 lines) Patch
M sdk/lib/io/http_impl.dart View 2 chunks +2 lines, -10 lines 0 comments Download
M sdk/lib/io/http_parser.dart View 1 2 13 chunks +47 lines, -27 lines 0 comments Download
M tests/standalone/io/http_parser_test.dart View 4 chunks +10 lines, -6 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Søren Gjesse
8 years, 1 month ago (2012-11-07 12:53:57 UTC) #1
Mads Ager (google)
https://codereview.chromium.org/11359085/diff/1/sdk/lib/io/http_impl.dart File sdk/lib/io/http_impl.dart (left): https://codereview.chromium.org/11359085/diff/1/sdk/lib/io/http_impl.dart#oldcode1315 sdk/lib/io/http_impl.dart:1315: _destroy(); With this change we lose this _destroy call. ...
8 years, 1 month ago (2012-11-07 13:02:51 UTC) #2
Søren Gjesse
https://codereview.chromium.org/11359085/diff/1/sdk/lib/io/http_impl.dart File sdk/lib/io/http_impl.dart (left): https://codereview.chromium.org/11359085/diff/1/sdk/lib/io/http_impl.dart#oldcode1315 sdk/lib/io/http_impl.dart:1315: _destroy(); On 2012/11/07 13:02:51, Mads Ager wrote: > With ...
8 years, 1 month ago (2012-11-07 13:31:14 UTC) #3
Mads Ager (google)
LGTM https://codereview.chromium.org/11359085/diff/5/sdk/lib/io/http_parser.dart File sdk/lib/io/http_parser.dart (right): https://codereview.chromium.org/11359085/diff/5/sdk/lib/io/http_parser.dart#newcode566 sdk/lib/io/http_parser.dart:566: if (_index == _lastIndex) _releaseBuffer(); Can we make ...
8 years, 1 month ago (2012-11-07 13:36:43 UTC) #4
Søren Gjesse
8 years, 1 month ago (2012-11-07 13:58:33 UTC) #5
https://codereview.chromium.org/11359085/diff/5/sdk/lib/io/http_parser.dart
File sdk/lib/io/http_parser.dart (right):

https://codereview.chromium.org/11359085/diff/5/sdk/lib/io/http_parser.dart#n...
sdk/lib/io/http_parser.dart:566: if (_index == _lastIndex) _releaseBuffer();
On 2012/11/07 13:36:43, Mads Ager wrote:
> Can we make this stronger? Maybe add an assert that _state is FAILURE or
_index
> == _lastIndex or something similar. Is there any reason to not _releaseBuffer
> always?

Changed to release buffer except when connection is upgraded.

Powered by Google App Engine
This is Rietveld 408576698