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

Side by Side Diff: net/spdy/spdy_framer.cc

Issue 6292013: Add chunked uploads support to SPDY (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't 5 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't
6 // constantly adding and subtracting header sizes; this is ugly and error- 6 // constantly adding and subtracting header sizes; this is ugly and error-
7 // prone. 7 // prone.
8 8
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 10
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 len -= amount_to_forward; 786 len -= amount_to_forward;
787 remaining_payload_ -= amount_to_forward; 787 remaining_payload_ -= amount_to_forward;
788 788
789 // If the FIN flag is set, and there is no more data in this data 789 // If the FIN flag is set, and there is no more data in this data
790 // frame, inform the visitor of EOF via a 0-length data frame. 790 // frame, inform the visitor of EOF via a 0-length data frame.
791 if (!remaining_payload_ && 791 if (!remaining_payload_ &&
792 current_data_frame.flags() & DATA_FLAG_FIN) { 792 current_data_frame.flags() & DATA_FLAG_FIN) {
793 visitor_->OnStreamFrameData(current_data_frame.stream_id(), NULL, 0); 793 visitor_->OnStreamFrameData(current_data_frame.stream_id(), NULL, 0);
794 CleanupDecompressorForStream(current_data_frame.stream_id()); 794 CleanupDecompressorForStream(current_data_frame.stream_id());
795 } 795 }
796 } else if (current_data_frame.flags() & DATA_FLAG_FIN) {
willchan no longer on Chromium 2011/03/02 18:44:40 Someone else will have to verify this change is ok
Satish 2011/03/03 13:50:10 I reverted this change as mentioned above.
797 visitor_->OnStreamFrameData(current_data_frame.stream_id(), NULL, 0);
798 CleanupDecompressorForStream(current_data_frame.stream_id());
796 } else { 799 } else {
797 CHANGE_STATE(SPDY_AUTO_RESET); 800 CHANGE_STATE(SPDY_AUTO_RESET);
798 } 801 }
799 return original_len - len; 802 return original_len - len;
800 } 803 }
801 804
802 z_stream* SpdyFramer::GetHeaderCompressor() { 805 z_stream* SpdyFramer::GetHeaderCompressor() {
803 if (header_compressor_.get()) 806 if (header_compressor_.get())
804 return header_compressor_.get(); // Already initialized. 807 return header_compressor_.get(); // Already initialized.
805 808
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 } else { 1179 } else {
1177 frame_size = SpdyFrame::size(); 1180 frame_size = SpdyFrame::size();
1178 *header_length = frame_size; 1181 *header_length = frame_size;
1179 *payload_length = frame.length(); 1182 *payload_length = frame.length();
1180 *payload = frame.data() + SpdyFrame::size(); 1183 *payload = frame.data() + SpdyFrame::size();
1181 } 1184 }
1182 return true; 1185 return true;
1183 } 1186 }
1184 1187
1185 } // namespace spdy 1188 } // namespace spdy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698