Skip to content

Commit

Permalink
Allow GETs with data and POSTs without
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstevens committed Sep 4, 2011
1 parent dfee065 commit ea02f79
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/RoutingConnection.m
Expand Up @@ -29,6 +29,15 @@ - (BOOL)supportsMethod:(NSString *)method atPath:(NSString *)path {
return [super supportsMethod:method atPath:path];
}

- (BOOL)shouldHandleRequestForMethod:(NSString *)method atPath:(NSString *)path {
// The default implementation is strict about the use of Content-Length. Either
// a given method + path combination must *always* include data or *never*
// include data. The routing connection is lenient, a POST that sometimes does
// not include data or a GET that sometimes does is fine. It is up to the route
// implementations to decide how to handle these situations.
return YES;
}

- (void)processDataChunk:(NSData *)postDataChunk {
BOOL result = [request appendData:postDataChunk];
if (!result) {
Expand Down

0 comments on commit ea02f79

Please sign in to comment.