Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #135 from kgoodier/develop-future
Browse files Browse the repository at this point in the history
Groundwork for future push work
  • Loading branch information
kgoodier committed Oct 6, 2015
2 parents 9c185cc + 503fb8f commit 3bcde82
Show file tree
Hide file tree
Showing 20 changed files with 1,106 additions and 211 deletions.
26 changes: 26 additions & 0 deletions SPDY.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
5C2229591952257800CAF160 /* SPDYURLRequestTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2229581952257800CAF160 /* SPDYURLRequestTest.m */; };
5C2A211D19F9CA0E00D0EA76 /* SPDYLoggingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C2A211C19F9CA0E00D0EA76 /* SPDYLoggingTest.m */; };
5C427F111A1D57890072403D /* SPDYStopwatchTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C427F101A1D57890072403D /* SPDYStopwatchTest.m */; };
5C48CF7F1B0A65910082F7EF /* SPDYCacheStoragePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C48CF7D1B0A65910082F7EF /* SPDYCacheStoragePolicy.h */; };
5C48CF801B0A65910082F7EF /* SPDYCacheStoragePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C48CF7D1B0A65910082F7EF /* SPDYCacheStoragePolicy.h */; };
5C48CF811B0A65910082F7EF /* SPDYCacheStoragePolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C48CF7E1B0A65910082F7EF /* SPDYCacheStoragePolicy.m */; };
5C48CF821B0A65910082F7EF /* SPDYCacheStoragePolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C48CF7E1B0A65910082F7EF /* SPDYCacheStoragePolicy.m */; };
5C48CF831B0A65910082F7EF /* SPDYCacheStoragePolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C48CF7E1B0A65910082F7EF /* SPDYCacheStoragePolicy.m */; };
5C48CF841B0A65DD0082F7EF /* SPDYCacheStoragePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C48CF7D1B0A65910082F7EF /* SPDYCacheStoragePolicy.h */; };
5C48CF931B0A6A180082F7EF /* SPDYMockSessionTestBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C48CF921B0A6A180082F7EF /* SPDYMockSessionTestBase.m */; };
5C5EA46E1A119B630058FB64 /* SPDYOriginEndpoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C5EA46A1A119B630058FB64 /* SPDYOriginEndpoint.m */; };
5C5EA46F1A119B630058FB64 /* SPDYOriginEndpoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C5EA46A1A119B630058FB64 /* SPDYOriginEndpoint.m */; };
5C5EA4701A119B630058FB64 /* SPDYOriginEndpoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C5EA46A1A119B630058FB64 /* SPDYOriginEndpoint.m */; };
Expand All @@ -109,6 +116,7 @@
5C6B0D2C1A3A3E8400334BFA /* SPDYCanonicalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C6B0D281A3A3E8400334BFA /* SPDYCanonicalRequest.m */; };
5C6B0D2D1A3A3E8400334BFA /* SPDYCanonicalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C6B0D281A3A3E8400334BFA /* SPDYCanonicalRequest.m */; };
5C6B0D2E1A3A3E8400334BFA /* SPDYCanonicalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C6B0D281A3A3E8400334BFA /* SPDYCanonicalRequest.m */; };
5C6D809A1BC44C19003AF2E0 /* SPDYURLCacheTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C6D80991BC44C19003AF2E0 /* SPDYURLCacheTest.m */; settings = {ASSET_TAGS = (); }; };
5C9A0BD01A363BDC00CF2D3D /* SPDYOriginEndpointManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9A0BCF1A363BDC00CF2D3D /* SPDYOriginEndpointManager.m */; };
5C9A0BD11A363BDC00CF2D3D /* SPDYOriginEndpointManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9A0BCF1A363BDC00CF2D3D /* SPDYOriginEndpointManager.m */; };
5C9A0BD21A363BDC00CF2D3D /* SPDYOriginEndpointManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9A0BCF1A363BDC00CF2D3D /* SPDYOriginEndpointManager.m */; };
Expand Down Expand Up @@ -187,13 +195,18 @@
5C2229581952257800CAF160 /* SPDYURLRequestTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYURLRequestTest.m; sourceTree = "<group>"; };
5C2A211C19F9CA0E00D0EA76 /* SPDYLoggingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYLoggingTest.m; sourceTree = "<group>"; };
5C427F101A1D57890072403D /* SPDYStopwatchTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYStopwatchTest.m; sourceTree = "<group>"; };
5C48CF7D1B0A65910082F7EF /* SPDYCacheStoragePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDYCacheStoragePolicy.h; sourceTree = "<group>"; };
5C48CF7E1B0A65910082F7EF /* SPDYCacheStoragePolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYCacheStoragePolicy.m; sourceTree = "<group>"; };
5C48CF911B0A6A180082F7EF /* SPDYMockSessionTestBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDYMockSessionTestBase.h; sourceTree = "<group>"; };
5C48CF921B0A6A180082F7EF /* SPDYMockSessionTestBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYMockSessionTestBase.m; sourceTree = "<group>"; };
5C5EA4691A119B630058FB64 /* SPDYOriginEndpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDYOriginEndpoint.h; sourceTree = "<group>"; };
5C5EA46A1A119B630058FB64 /* SPDYOriginEndpoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYOriginEndpoint.m; sourceTree = "<group>"; };
5C5EA4711A119C950058FB64 /* SPDYMockOriginEndpointManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDYMockOriginEndpointManager.h; sourceTree = "<group>"; };
5C5EA4721A119C950058FB64 /* SPDYMockOriginEndpointManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYMockOriginEndpointManager.m; sourceTree = "<group>"; };
5C5EA4741A119CAB0058FB64 /* SPDYSocketTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYSocketTest.m; sourceTree = "<group>"; };
5C6B0D271A3A3E8400334BFA /* SPDYCanonicalRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDYCanonicalRequest.h; sourceTree = "<group>"; };
5C6B0D281A3A3E8400334BFA /* SPDYCanonicalRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYCanonicalRequest.m; sourceTree = "<group>"; };
5C6D80991BC44C19003AF2E0 /* SPDYURLCacheTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYURLCacheTest.m; sourceTree = "<group>"; };
5C9A0BCB1A363B7700CF2D3D /* SPDYOriginEndpointManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDYOriginEndpointManager.h; sourceTree = "<group>"; };
5C9A0BCF1A363BDC00CF2D3D /* SPDYOriginEndpointManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYOriginEndpointManager.m; sourceTree = "<group>"; };
5CA0B9C51A6454950068ABD9 /* SPDYProtocolTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDYProtocolTest.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -293,6 +306,7 @@
060C235D17CE9FCE000B4E9C /* SPDYStreamManagerTest.m */,
067EBFE617418F350029F16C /* SPDYStreamTest.m */,
5C2229581952257800CAF160 /* SPDYURLRequestTest.m */,
5C6D80991BC44C19003AF2E0 /* SPDYURLCacheTest.m */,
);
path = SPDYUnitTests;
sourceTree = "<group>";
Expand All @@ -309,6 +323,8 @@
7774C69089A6978113F0C275 /* SPDYMockFrameEncoderDelegate.m */,
5C5EA4711A119C950058FB64 /* SPDYMockOriginEndpointManager.h */,
5C5EA4721A119C950058FB64 /* SPDYMockOriginEndpointManager.m */,
5C48CF911B0A6A180082F7EF /* SPDYMockSessionTestBase.h */,
5C48CF921B0A6A180082F7EF /* SPDYMockSessionTestBase.m */,
7774C7E1AF717FC36B7F15B6 /* SPDYSocket+SPDYSocketMock.h */,
7774C0ECD0C6E5D73FB38752 /* SPDYSocket+SPDYSocketMock.m */,
5CF0A2CA1A0952BA00B6D141 /* SPDYMockURLProtocolClient.h */,
Expand Down Expand Up @@ -374,6 +390,8 @@
069D0E99168268F10037D8AF /* NSURLRequest+SPDYURLRequest.h */,
069D0E9A168268F10037D8AF /* NSURLRequest+SPDYURLRequest.m */,
D2CC14B816179B43002E37CF /* SPDY-Prefix.pch */,
5C48CF7D1B0A65910082F7EF /* SPDYCacheStoragePolicy.h */,
5C48CF7E1B0A65910082F7EF /* SPDYCacheStoragePolicy.m */,
5C6B0D271A3A3E8400334BFA /* SPDYCanonicalRequest.h */,
5C6B0D281A3A3E8400334BFA /* SPDYCanonicalRequest.m */,
062EA63E175D4CD3003BC1CE /* SPDYCommonLogger.h */,
Expand Down Expand Up @@ -442,6 +460,7 @@
5C6B0D2A1A3A3E8400334BFA /* SPDYCanonicalRequest.h in Headers */,
0540DAA919CB7FEB00673796 /* SPDYCommonLogger.h in Headers */,
7774CD9416661E40D76713F5 /* SPDYStopwatch.h in Headers */,
5C48CF801B0A65910082F7EF /* SPDYCacheStoragePolicy.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -458,6 +477,7 @@
5C6B0D291A3A3E8400334BFA /* SPDYCanonicalRequest.h in Headers */,
0540DAAA19CB7FEB00673796 /* SPDYCommonLogger.h in Headers */,
7774CC29BBD86413798C1425 /* SPDYStopwatch.h in Headers */,
5C48CF7F1B0A65910082F7EF /* SPDYCacheStoragePolicy.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -474,6 +494,7 @@
5C6B0D2B1A3A3E8400334BFA /* SPDYCanonicalRequest.h in Headers */,
062EA640175D4CD3003BC1CE /* SPDYCommonLogger.h in Headers */,
7774CF887055793F373F0D5E /* SPDYStopwatch.h in Headers */,
5C48CF841B0A65DD0082F7EF /* SPDYCacheStoragePolicy.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -649,7 +670,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C6D809A1BC44C19003AF2E0 /* SPDYURLCacheTest.m in Sources */,
5C0456FF19B033E9009E0AC2 /* SPDYSocketOps.m in Sources */,
5C48CF931B0A6A180082F7EF /* SPDYMockSessionTestBase.m in Sources */,
06FDA20616717DF100137DBD /* SPDYSocket.m in Sources */,
5CA0B9C81A6486F10068ABD9 /* SPDYSettingsStoreTest.m in Sources */,
5C210A0A1A5F48C500ADB538 /* SPDYSessionPool.m in Sources */,
Expand All @@ -665,6 +688,7 @@
060C235E17CE9FCE000B4E9C /* SPDYStreamManagerTest.m in Sources */,
5C427F111A1D57890072403D /* SPDYStopwatchTest.m in Sources */,
06290995169E4D9700E35A82 /* SPDYHeaderBlockCompressor.m in Sources */,
5C48CF811B0A65910082F7EF /* SPDYCacheStoragePolicy.m in Sources */,
06FDA21216717DF100137DBD /* SPDYHeaderBlockDecompressor.m in Sources */,
5C04570519B043CB009E0AC2 /* SPDYOriginEndpointTest.m in Sources */,
5C5EA4751A119CAB0058FB64 /* SPDYSocketTest.m in Sources */,
Expand Down Expand Up @@ -708,6 +732,7 @@
0651EC4016F3FA1400CE44D2 /* SPDYHeaderBlockCompressor.m in Sources */,
0651EC4116F3FA1400CE44D2 /* SPDYHeaderBlockDecompressor.m in Sources */,
0651EC4216F3FA1400CE44D2 /* SPDYProtocol.m in Sources */,
5C48CF821B0A65910082F7EF /* SPDYCacheStoragePolicy.m in Sources */,
0651EC4316F3FA1400CE44D2 /* SPDYSession.m in Sources */,
0651EC4416F3FA1400CE44D2 /* SPDYSessionManager.m in Sources */,
0651EC4516F3FA1400CE44D2 /* SPDYSettingsStore.m in Sources */,
Expand Down Expand Up @@ -737,6 +762,7 @@
0651EC2616F3FA0B00CE44D2 /* SPDYHeaderBlockCompressor.m in Sources */,
0651EC2716F3FA0B00CE44D2 /* SPDYHeaderBlockDecompressor.m in Sources */,
0651EC2816F3FA0B00CE44D2 /* SPDYProtocol.m in Sources */,
5C48CF831B0A65910082F7EF /* SPDYCacheStoragePolicy.m in Sources */,
0651EC2916F3FA0B00CE44D2 /* SPDYSession.m in Sources */,
0651EC2A16F3FA0B00CE44D2 /* SPDYSessionManager.m in Sources */,
0651EC2B16F3FA0B00CE44D2 /* SPDYSettingsStore.m in Sources */,
Expand Down
2 changes: 0 additions & 2 deletions SPDY/NSURLRequest+SPDYURLRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

#import <Foundation/Foundation.h>

@protocol SPDYExtendedDelegate;

@interface NSURLRequest (SPDYURLRequest)

/**
Expand Down
26 changes: 26 additions & 0 deletions SPDY/SPDYCacheStoragePolicy.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// SPDYCacheStoragePolicy.h
// SPDY
//
// Copyright (c) 2014 Twitter, Inc. All rights reserved.
// Licensed under the Apache License v2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Derived from code in Apple, Inc.'s CustomHTTPProtocol sample
// project, found as of this notice at
// https://developer.apple.com/LIBRARY/IOS/samplecode/CustomHTTPProtocol
//

#include <Foundation/Foundation.h>

/*! Determines the cache storage policy for a response.
* \details When we provide a response up to the client we need to tell the client whether
* the response is cacheable or not. The default HTTP/HTTPS protocol has a reasonable
* complex chunk of code to determine this, but we can't get at it. Thus, we have to
* reimplement it ourselves. This is split off into a separate file to emphasise that
* this is standard boilerplate that you probably don't need to look at.
* \param request The request that generated the response; must not be nil.
* \param response The response itself; must not be nil.
* \returns A cache storage policy to use.
*/
extern NSURLCacheStoragePolicy SPDYCacheStoragePolicy(NSURLRequest *request, NSHTTPURLResponse *response);
85 changes: 85 additions & 0 deletions SPDY/SPDYCacheStoragePolicy.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
//
// SPDYCacheStoragePolicy.m
// SPDY
//
// Copyright (c) 2014 Twitter, Inc. All rights reserved.
// Licensed under the Apache License v2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Derived from code in Apple, Inc.'s CustomHTTPProtocol sample
// project, found as of this notice at
// https://developer.apple.com/LIBRARY/IOS/samplecode/CustomHTTPProtocol
//

#import "SPDYCacheStoragePolicy.h"

extern NSURLCacheStoragePolicy SPDYCacheStoragePolicy(NSURLRequest *request, NSHTTPURLResponse *response)
{
bool cacheable;
NSURLCacheStoragePolicy result;

// First determine if the request is cacheable based on its status code.

switch (response.statusCode) {
case 200:
case 203:
case 206:
case 301:
case 304:
case 404:
case 410:
cacheable = YES;
break;
default:
cacheable = NO;
break;
}

// If the response might be cacheable, look at the "Cache-Control" header in
// the response.

// IMPORTANT: We can't rely on -rangeOfString: returning valid results if the target
// string is nil, so we have to explicitly test for nil in the following two cases.

if (cacheable) {
NSString *responseHeader;

for (NSString *key in [response.allHeaderFields allKeys]) {
if ([key caseInsensitiveCompare:@"cache-control"] == NSOrderedSame) {
responseHeader = [response.allHeaderFields[key] lowercaseString];
break;
}
}

if (responseHeader != nil && [responseHeader rangeOfString:@"no-store"].location != NSNotFound) {
cacheable = NO;
}
}

// If we still think it might be cacheable, look at the "Cache-Control" header in
// the request.

if (cacheable) {
NSString *requestHeader;

requestHeader = [[request valueForHTTPHeaderField:@"cache-control"] lowercaseString];
if (requestHeader != nil &&
[requestHeader rangeOfString:@"no-store"].location != NSNotFound &&
[requestHeader rangeOfString:@"no-cache"].location != NSNotFound) {
cacheable = NO;
}
}

// Use the cacheable flag to determine the result.

if (cacheable) {
// Modern versions of iOS use file protection to protect the cache, and thus are
// happy to cache HTTPS on disk. Previous code here returned
// NSURLCacheStorageAllowedInMemoryOnly for https.
result = NSURLCacheStorageAllowed;
} else {
result = NSURLCacheStorageNotAllowed;
}

return result;
}
24 changes: 7 additions & 17 deletions SPDY/SPDYSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,7 @@ - (void)didReadDataFrame:(SPDYDataFrame *)dataFrame frameDecoder:(SPDYFrameDecod
// Check if we received a data frame before receiving a SYN_REPLY
if (stream.local && !stream.receivedReply) {
SPDY_WARNING(@"received data before SYN_REPLY");
[self _sendRstStream:SPDY_STREAM_PROTOCOL_ERROR streamId:streamId];
[stream closeWithError:SPDY_STREAM_ERROR(SPDYStreamProtocolError, @"received data before syn reply")];
[stream abortWithError:SPDY_STREAM_ERROR(SPDYStreamProtocolError, @"received data before syn reply") status:SPDY_STREAM_PROTOCOL_ERROR];
return;
}

Expand All @@ -506,8 +505,7 @@ - (void)didReadDataFrame:(SPDYDataFrame *)dataFrame frameDecoder:(SPDYFrameDecod
// Note this can't currently happen in this implementation.
// TODO: all of these variables are unsigned, how can this statement ever work?
if (stream.receiveWindowSize - dataFrame.data.length < stream.receiveWindowSizeLowerBound) {
[self _sendRstStream:SPDY_STREAM_FLOW_CONTROL_ERROR streamId:streamId];
[stream closeWithError:SPDY_STREAM_ERROR(SPDYStreamProtocolError, @"flow control window error")];
[stream abortWithError:SPDY_STREAM_ERROR(SPDYStreamProtocolError, @"flow control window error") status:SPDY_STREAM_FLOW_CONTROL_ERROR];
return;
}

Expand Down Expand Up @@ -632,8 +630,7 @@ - (void)didReadSynReplyFrame:(SPDYSynReplyFrame *)synReplyFrame frameDecoder:(SP
// Check if we have received multiple frames for the same Stream-ID
if (stream.receivedReply) {
SPDY_WARNING(@"received duplicate SYN_REPLY");
[self _sendRstStream:SPDY_STREAM_STREAM_IN_USE streamId:streamId];
[stream closeWithError:SPDY_STREAM_ERROR(SPDYStreamStreamInUse, @"duplicate syn reply stream id")];
[stream abortWithError:SPDY_STREAM_ERROR(SPDYStreamStreamInUse, @"duplicate syn reply stream id") status:SPDY_STREAM_STREAM_IN_USE];
return;
}

Expand Down Expand Up @@ -856,18 +853,12 @@ - (void)didReadWindowUpdateFrame:(SPDYWindowUpdateFrame *)windowUpdateFrame fram

#pragma mark SPDYStreamDelegate

- (void)streamCanceled:(SPDYStream *)stream
- (void)streamCanceled:(SPDYStream *)stream status:(SPDYStreamStatus)status
{
SPDY_INFO(@"stream %u canceled", stream.streamId);
SPDY_INFO(@"stream %u canceled, status %u", stream.streamId, status);
NSAssert(_activeStreams[stream.streamId], @"stream delegate must be managing stream");

[self _sendRstStream:SPDY_STREAM_CANCEL streamId:stream.streamId];

// closeWithError will end up calling back into streamClosed below. It will also call out to
// the app via connection:didFailWithError, but Apple states that after stopLoading is called,
// we must stop making delegate calls out to the app.
stream.client = nil;
[stream closeWithError:SPDY_STREAM_ERROR(SPDYStreamCancel, @"stream canceled")];
[self _sendRstStream:status streamId:stream.streamId];
}

- (void)streamClosed:(SPDYStream *)stream
Expand Down Expand Up @@ -1000,8 +991,7 @@ - (void)_sendData:(SPDYStream *)stream
stream.localSideClosed = dataFrame.last;
} else {
if (error) {
[self _sendRstStream:SPDY_STREAM_INTERNAL_ERROR streamId:streamId];
[stream closeWithError:error];
[stream abortWithError:error status:SPDY_STREAM_INTERNAL_ERROR];
return;
}

Expand Down
2 changes: 0 additions & 2 deletions SPDY/SPDYSessionManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

#import <Foundation/Foundation.h>

@protocol SPDYSessionDelegate;

@interface SPDYSessionManager : NSObject

+ (SPDYSessionManager *)localManagerForOrigin:(SPDYOrigin *)origin;
Expand Down
4 changes: 2 additions & 2 deletions SPDY/SPDYSessionManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ @interface SPDYSessionManager () <SPDYSessionDelegate, SPDYStreamDelegate>
- (void)session:(SPDYSession *)session capacityIncreased:(NSUInteger)capacity;
- (void)session:(SPDYSession *)session connectedToNetwork:(bool)cellular;
- (void)sessionClosed:(SPDYSession *)session error:(NSError *)error;
- (void)streamCanceled:(SPDYStream *)stream;
- (void)streamCanceled:(SPDYStream *)stream status:(SPDYStreamStatus)status;
@end

@implementation SPDYSessionManager
Expand Down Expand Up @@ -155,7 +155,7 @@ - (void)queueStream:(SPDYStream *)stream

#pragma mark SPDYStreamDelegate

- (void)streamCanceled:(SPDYStream *)stream
- (void)streamCanceled:(SPDYStream *)stream status:(SPDYStreamStatus)status
{
NSAssert(_pendingStreams[stream.protocol], @"stream delegate must be managing stream");

Expand Down
Loading

0 comments on commit 3bcde82

Please sign in to comment.