20 Commits
3.2.5 ... 3.2.6

Author SHA1 Message Date
Pierre-Olivier Latour
f6783daadd Updated test script to run built-in tests 2015-09-09 09:41:00 -07:00
Pierre-Olivier Latour
99cae36644 Added minimal tests for Mac framework 2015-09-09 09:36:29 -07:00
Pierre-Olivier Latour
b292710102 Fix 2015-09-09 08:41:08 -07:00
Pierre-Olivier Latour
b8b4a35178 Add version to framework Info.plist 2015-09-09 08:37:51 -07:00
Pierre-Olivier Latour
ecc572a934 Bumped version to 3.2.6 2015-09-09 08:37:36 -07:00
Pierre-Olivier Latour
3a02341b0c Disable testing and running in shared schemes for frameworks 2015-09-09 08:31:18 -07:00
Pierre-Olivier Latour
e792fe8eb6 Fixes 2015-09-09 08:30:54 -07:00
Pierre-Olivier Latour
4c8ec1d685 Removed unnecessary files from Xcode project 2015-09-09 08:25:53 -07:00
Pierre-Olivier Latour
f7bb5babf8 Bumped copyright year 2015-09-09 08:24:47 -07:00
Pierre-Olivier Latour
ae88198f20 Update README.md 2015-08-13 20:29:26 -07:00
Pierre-Olivier Latour
d71c0d493f Update README.md 2015-08-03 08:46:44 -07:00
Pierre-Olivier Latour
d611ae0cbe Merge pull request #187 from lfaoro/patch-2
Update README.md
2015-07-06 16:07:02 -07:00
Leonard
93287edfd5 Update README.md
The previous code won't compile in Swift, it had a missing ')' and the 'println' statement is deprecated, replaced by 'print'.
The bridging-headers syntax was wrong, couldn't compile.
Swift still requires an 'import GCDWebServers' statement to use the API
2015-07-07 00:17:31 +02:00
Pierre-Olivier Latour
dc287906d6 Merge pull request #186 from lfaoro/patch-1
Update README.md
2015-07-06 10:44:57 -07:00
Leonard
ab9459a67a Update README.md
the version number should not have quotes, with the quotes carthage errors: 
Parse error: unexpected trailing characters in line: github "swisspol/GCDWebServer" ~> "3.2.5"
2015-07-06 19:26:07 +02:00
Pierre-Olivier Latour
aa8fc97b9b Fixed buffer overflow when retrieving socket addresses 2015-07-03 10:17:33 -07:00
Pierre-Olivier Latour
863febed62 Updated for Xcode 7 2015-07-03 09:55:46 -07:00
Pierre-Olivier Latour
2ff117dbf3 Merge pull request #183 from guidomb/patch-1
Fixes error in Carthage documentation
2015-07-03 09:44:00 -07:00
Guido Marucci Blas
4838d0def9 Fixes error in Carthage documentation
~> is like an operator and does not go inside the version string. https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile
2015-07-03 13:43:03 -03:00
Pierre-Olivier Latour
c394ae8bf5 Update README.md 2015-07-03 08:51:42 -07:00
48 changed files with 282 additions and 121 deletions

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
@@ -25,21 +25,25 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
// GCDWebServer // GCDWebServer Core
#import <GCDWebServers/GCDWebServer.h> #import <GCDWebServers/GCDWebServer.h>
#import <GCDWebServers/GCDWebServerHTTPStatusCodes.h>
#import <GCDWebServers/GCDWebServerRequest.h>
#import <GCDWebServers/GCDWebServerErrorResponse.h>
#import <GCDWebServers/GCDWebServerURLEncodedFormRequest.h>
#import <GCDWebServers/GCDWebServerResponse.h>
#import <GCDWebServers/GCDWebServerFileResponse.h>
#import <GCDWebServers/GCDWebServerMultiPartFormRequest.h>
#import <GCDWebServers/GCDWebServerStreamedResponse.h>
#import <GCDWebServers/GCDWebServerConnection.h> #import <GCDWebServers/GCDWebServerConnection.h>
#import <GCDWebServers/GCDWebServerDataRequest.h>
#import <GCDWebServers/GCDWebServerDataResponse.h>
#import <GCDWebServers/GCDWebServerFunctions.h> #import <GCDWebServers/GCDWebServerFunctions.h>
#import <GCDWebServers/GCDWebServerHTTPStatusCodes.h>
#import <GCDWebServers/GCDWebServerResponse.h>
#import <GCDWebServers/GCDWebServerRequest.h>
// GCDWebServer Requests
#import <GCDWebServers/GCDWebServerDataRequest.h>
#import <GCDWebServers/GCDWebServerFileRequest.h> #import <GCDWebServers/GCDWebServerFileRequest.h>
#import <GCDWebServers/GCDWebServerMultiPartFormRequest.h>
#import <GCDWebServers/GCDWebServerURLEncodedFormRequest.h>
// GCDWebServer Responses
#import <GCDWebServers/GCDWebServerDataResponse.h>
#import <GCDWebServers/GCDWebServerErrorResponse.h>
#import <GCDWebServers/GCDWebServerFileResponse.h>
#import <GCDWebServers/GCDWebServerStreamedResponse.h>
// GCDWebUploader // GCDWebUploader
#import <GCDWebServers/GCDWebUploader.h> #import <GCDWebServers/GCDWebUploader.h>

View File

@@ -7,12 +7,14 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>net.pol-online.$(PRODUCT_NAME:rfc1034identifier)</string> <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string> <string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>${BUNDLE_VERSION_STRING}</string>
</dict> </dict>
</plist> </plist>

24
Frameworks/Tests.m Normal file
View File

@@ -0,0 +1,24 @@
#import <GCDWebServers/GCDWebServers.h>
#import <XCTest/XCTest.h>
@interface Tests : XCTestCase
@end
@implementation Tests
- (void)testWebServer {
GCDWebServer* server = [[GCDWebServer alloc] init];
XCTAssertNotNil(server);
}
- (void)testDAVServer {
GCDWebDAVServer* server = [[GCDWebDAVServer alloc] init];
XCTAssertNotNil(server);
}
- (void)testWebUploader {
GCDWebUploader* server = [[GCDWebUploader alloc] init];
XCTAssertNotNil(server);
}
@end

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -7,7 +7,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'GCDWebServer' s.name = 'GCDWebServer'
s.version = '3.2.5' s.version = '3.2.6'
s.author = { 'Pierre-Olivier Latour' => 'info@pol-online.net' } s.author = { 'Pierre-Olivier Latour' => 'info@pol-online.net' }
s.license = { :type => 'BSD', :file => 'LICENSE' } s.license = { :type => 'BSD', :file => 'LICENSE' }
s.homepage = 'https://github.com/swisspol/GCDWebServer' s.homepage = 'https://github.com/swisspol/GCDWebServer'

View File

@@ -110,6 +110,8 @@
E22112991690B7AA0048D2B2 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E22112981690B7AA0048D2B2 /* CFNetwork.framework */; }; E22112991690B7AA0048D2B2 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E22112981690B7AA0048D2B2 /* CFNetwork.framework */; };
E221129B1690B7B10048D2B2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E221129A1690B7B10048D2B2 /* UIKit.framework */; }; E221129B1690B7B10048D2B2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E221129A1690B7B10048D2B2 /* UIKit.framework */; };
E221129D1690B7BA0048D2B2 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E221129C1690B7BA0048D2B2 /* MobileCoreServices.framework */; }; E221129D1690B7BA0048D2B2 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E221129C1690B7BA0048D2B2 /* MobileCoreServices.framework */; };
E240392B1BA09207000B7089 /* GCDWebServers.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEE28CD11AE004D800F4023C /* GCDWebServers.framework */; };
E24039321BA092B7000B7089 /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = E24039311BA092B7000B7089 /* Tests.m */; };
E28BAE3418F99C810095C089 /* GCDWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE1718F99C810095C089 /* GCDWebServer.m */; }; E28BAE3418F99C810095C089 /* GCDWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE1718F99C810095C089 /* GCDWebServer.m */; };
E28BAE3518F99C810095C089 /* GCDWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE1718F99C810095C089 /* GCDWebServer.m */; }; E28BAE3518F99C810095C089 /* GCDWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE1718F99C810095C089 /* GCDWebServer.m */; };
E28BAE3618F99C810095C089 /* GCDWebServerConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE1918F99C810095C089 /* GCDWebServerConnection.m */; }; E28BAE3618F99C810095C089 /* GCDWebServerConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE1918F99C810095C089 /* GCDWebServerConnection.m */; };
@@ -164,6 +166,13 @@
remoteGlobalIDString = CEE28CEE1AE0051F00F4023C; remoteGlobalIDString = CEE28CEE1AE0051F00F4023C;
remoteInfo = "GCDWebServers (iOS)"; remoteInfo = "GCDWebServers (iOS)";
}; };
E240392C1BA09207000B7089 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = CEE28CD01AE004D800F4023C;
remoteInfo = "GCDWebServers (Mac)";
};
E274F87A187E77E3009E0582 /* PBXContainerItemProxy */ = { E274F87A187E77E3009E0582 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
@@ -213,8 +222,8 @@
E22112981690B7AA0048D2B2 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; E22112981690B7AA0048D2B2 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; };
E221129A1690B7B10048D2B2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; E221129A1690B7B10048D2B2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
E221129C1690B7BA0048D2B2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; }; E221129C1690B7BA0048D2B2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; };
E26DC18719E84B2200C68DDC /* GCDWebServer.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = GCDWebServer.podspec; sourceTree = "<group>"; }; E24039251BA09207000B7089 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
E26DC18819E84BC000C68DDC /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; E24039311BA092B7000B7089 /* Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
E28BAE1618F99C810095C089 /* GCDWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServer.h; sourceTree = "<group>"; }; E28BAE1618F99C810095C089 /* GCDWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServer.h; sourceTree = "<group>"; };
E28BAE1718F99C810095C089 /* GCDWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebServer.m; sourceTree = "<group>"; }; E28BAE1718F99C810095C089 /* GCDWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebServer.m; sourceTree = "<group>"; };
E28BAE1818F99C810095C089 /* GCDWebServerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServerConnection.h; sourceTree = "<group>"; }; E28BAE1818F99C810095C089 /* GCDWebServerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServerConnection.h; sourceTree = "<group>"; };
@@ -306,14 +315,20 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
E24039221BA09207000B7089 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E240392B1BA09207000B7089 /* GCDWebServers.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
08FB7794FE84155DC02AAC07 /* LittleCMS */ = { 08FB7794FE84155DC02AAC07 /* LittleCMS */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E26DC18819E84BC000C68DDC /* README.md */,
E26DC18719E84B2200C68DDC /* GCDWebServer.podspec */,
E28BAE1418F99C810095C089 /* GCDWebServer */, E28BAE1418F99C810095C089 /* GCDWebServer */,
E2A0E80718F3432600C580B1 /* GCDWebDAVServer */, E2A0E80718F3432600C580B1 /* GCDWebDAVServer */,
E2BE850618E77ECA0061360B /* GCDWebUploader */, E2BE850618E77ECA0061360B /* GCDWebUploader */,
@@ -334,6 +349,7 @@
E221125A1690B4DE0048D2B2 /* GCDWebServer.app */, E221125A1690B4DE0048D2B2 /* GCDWebServer.app */,
CEE28CD11AE004D800F4023C /* GCDWebServers.framework */, CEE28CD11AE004D800F4023C /* GCDWebServers.framework */,
CEE28CEF1AE0051F00F4023C /* GCDWebServers.framework */, CEE28CEF1AE0051F00F4023C /* GCDWebServers.framework */,
E24039251BA09207000B7089 /* Tests.xctest */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -343,6 +359,7 @@
children = ( children = (
CEE28CF31AE0051F00F4023C /* GCDWebServers.h */, CEE28CF31AE0051F00F4023C /* GCDWebServers.h */,
CEE28CF21AE0051F00F4023C /* Info.plist */, CEE28CF21AE0051F00F4023C /* Info.plist */,
E24039311BA092B7000B7089 /* Tests.m */,
); );
path = Frameworks; path = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -478,23 +495,23 @@
isa = PBXHeadersBuildPhase; isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
CEE28D471AE0078A00F4023C /* GCDWebUploader.h in Headers */, CEE28D521AE00A7A00F4023C /* GCDWebServers.h in Headers */,
CEE28D151AE006ED00F4023C /* GCDWebServerHTTPStatusCodes.h in Headers */, CEE28D151AE006ED00F4023C /* GCDWebServerHTTPStatusCodes.h in Headers */,
CEE28D191AE006FD00F4023C /* GCDWebServerRequest.h in Headers */, CEE28D191AE006FD00F4023C /* GCDWebServerRequest.h in Headers */,
CEE28D091AE006C200F4023C /* GCDWebServer.h in Headers */, CEE28D091AE006C200F4023C /* GCDWebServer.h in Headers */,
CEE28D351AE0074D00F4023C /* GCDWebServerErrorResponse.h in Headers */, CEE28D351AE0074D00F4023C /* GCDWebServerErrorResponse.h in Headers */,
CEE28D2D1AE0073300F4023C /* GCDWebServerURLEncodedFormRequest.h in Headers */, CEE28D2D1AE0073300F4023C /* GCDWebServerURLEncodedFormRequest.h in Headers */,
CEE28D411AE0077800F4023C /* GCDWebDAVServer.h in Headers */,
CEE28D1D1AE0070600F4023C /* GCDWebServerResponse.h in Headers */, CEE28D1D1AE0070600F4023C /* GCDWebServerResponse.h in Headers */,
CEE28D391AE0075C00F4023C /* GCDWebServerFileResponse.h in Headers */, CEE28D391AE0075C00F4023C /* GCDWebServerFileResponse.h in Headers */,
CEE28D291AE0072800F4023C /* GCDWebServerMultiPartFormRequest.h in Headers */, CEE28D291AE0072800F4023C /* GCDWebServerMultiPartFormRequest.h in Headers */,
CEE28D3D1AE0076700F4023C /* GCDWebServerStreamedResponse.h in Headers */, CEE28D3D1AE0076700F4023C /* GCDWebServerStreamedResponse.h in Headers */,
CEE28D0D1AE006D700F4023C /* GCDWebServerConnection.h in Headers */, CEE28D0D1AE006D700F4023C /* GCDWebServerConnection.h in Headers */,
CEE28D211AE0071200F4023C /* GCDWebServerDataRequest.h in Headers */, CEE28D211AE0071200F4023C /* GCDWebServerDataRequest.h in Headers */,
CEE28D521AE00A7A00F4023C /* GCDWebServers.h in Headers */,
CEE28D311AE0074200F4023C /* GCDWebServerDataResponse.h in Headers */, CEE28D311AE0074200F4023C /* GCDWebServerDataResponse.h in Headers */,
CEE28D111AE006E200F4023C /* GCDWebServerFunctions.h in Headers */, CEE28D111AE006E200F4023C /* GCDWebServerFunctions.h in Headers */,
CEE28D251AE0071E00F4023C /* GCDWebServerFileRequest.h in Headers */, CEE28D251AE0071E00F4023C /* GCDWebServerFileRequest.h in Headers */,
CEE28D411AE0077800F4023C /* GCDWebDAVServer.h in Headers */,
CEE28D471AE0078A00F4023C /* GCDWebUploader.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -506,11 +523,9 @@
CEE28D261AE0071E00F4023C /* GCDWebServerFileRequest.h in Headers */, CEE28D261AE0071E00F4023C /* GCDWebServerFileRequest.h in Headers */,
CEE28D321AE0074200F4023C /* GCDWebServerDataResponse.h in Headers */, CEE28D321AE0074200F4023C /* GCDWebServerDataResponse.h in Headers */,
CEE28D121AE006E300F4023C /* GCDWebServerFunctions.h in Headers */, CEE28D121AE006E300F4023C /* GCDWebServerFunctions.h in Headers */,
CEE28D481AE0078B00F4023C /* GCDWebUploader.h in Headers */,
CEE28D221AE0071300F4023C /* GCDWebServerDataRequest.h in Headers */, CEE28D221AE0071300F4023C /* GCDWebServerDataRequest.h in Headers */,
CEE28D1A1AE006FD00F4023C /* GCDWebServerRequest.h in Headers */, CEE28D1A1AE006FD00F4023C /* GCDWebServerRequest.h in Headers */,
CEE28D0E1AE006D800F4023C /* GCDWebServerConnection.h in Headers */, CEE28D0E1AE006D800F4023C /* GCDWebServerConnection.h in Headers */,
CEE28D421AE0077800F4023C /* GCDWebDAVServer.h in Headers */,
CEE28D161AE006EE00F4023C /* GCDWebServerHTTPStatusCodes.h in Headers */, CEE28D161AE006EE00F4023C /* GCDWebServerHTTPStatusCodes.h in Headers */,
CEE28D3A1AE0075D00F4023C /* GCDWebServerFileResponse.h in Headers */, CEE28D3A1AE0075D00F4023C /* GCDWebServerFileResponse.h in Headers */,
CEE28D2A1AE0072800F4023C /* GCDWebServerMultiPartFormRequest.h in Headers */, CEE28D2A1AE0072800F4023C /* GCDWebServerMultiPartFormRequest.h in Headers */,
@@ -519,6 +534,8 @@
CEE28D2E1AE0073400F4023C /* GCDWebServerURLEncodedFormRequest.h in Headers */, CEE28D2E1AE0073400F4023C /* GCDWebServerURLEncodedFormRequest.h in Headers */,
CEE28D0A1AE006C300F4023C /* GCDWebServer.h in Headers */, CEE28D0A1AE006C300F4023C /* GCDWebServer.h in Headers */,
CEE28D361AE0074E00F4023C /* GCDWebServerErrorResponse.h in Headers */, CEE28D361AE0074E00F4023C /* GCDWebServerErrorResponse.h in Headers */,
CEE28D421AE0077800F4023C /* GCDWebDAVServer.h in Headers */,
CEE28D481AE0078B00F4023C /* GCDWebUploader.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -597,13 +614,30 @@
productReference = E221125A1690B4DE0048D2B2 /* GCDWebServer.app */; productReference = E221125A1690B4DE0048D2B2 /* GCDWebServer.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
E24039241BA09207000B7089 /* Tests (Mac) */ = {
isa = PBXNativeTarget;
buildConfigurationList = E240392E1BA09207000B7089 /* Build configuration list for PBXNativeTarget "Tests (Mac)" */;
buildPhases = (
E24039211BA09207000B7089 /* Sources */,
E24039221BA09207000B7089 /* Frameworks */,
);
buildRules = (
);
dependencies = (
E240392D1BA09207000B7089 /* PBXTargetDependency */,
);
name = "Tests (Mac)";
productName = "GCDWebServers Tests (Mac)";
productReference = E24039251BA09207000B7089 /* Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
/* Begin PBXProject section */ /* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = { 08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 0630; LastUpgradeCheck = 0700;
TargetAttributes = { TargetAttributes = {
CEE28CD01AE004D800F4023C = { CEE28CD01AE004D800F4023C = {
CreatedOnToolsVersion = 6.3; CreatedOnToolsVersion = 6.3;
@@ -611,6 +645,9 @@
CEE28CEE1AE0051F00F4023C = { CEE28CEE1AE0051F00F4023C = {
CreatedOnToolsVersion = 6.3; CreatedOnToolsVersion = 6.3;
}; };
E24039241BA09207000B7089 = {
CreatedOnToolsVersion = 6.4;
};
}; };
}; };
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "GCDWebServer" */; buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "GCDWebServer" */;
@@ -633,6 +670,7 @@
E22112591690B4DE0048D2B2 /* GCDWebServer (iOS) */, E22112591690B4DE0048D2B2 /* GCDWebServer (iOS) */,
CEE28CD01AE004D800F4023C /* GCDWebServers (Mac) */, CEE28CD01AE004D800F4023C /* GCDWebServers (Mac) */,
CEE28CEE1AE0051F00F4023C /* GCDWebServers (iOS) */, CEE28CEE1AE0051F00F4023C /* GCDWebServers (iOS) */,
E24039241BA09207000B7089 /* Tests (Mac) */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
@@ -773,6 +811,14 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
E24039211BA09207000B7089 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E24039321BA092B7000B7089 /* Tests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */ /* Begin PBXTargetDependency section */
@@ -786,6 +832,11 @@
target = CEE28CEE1AE0051F00F4023C /* GCDWebServers (iOS) */; target = CEE28CEE1AE0051F00F4023C /* GCDWebServers (iOS) */;
targetProxy = CE54F3951AE84FCA003C110E /* PBXContainerItemProxy */; targetProxy = CE54F3951AE84FCA003C110E /* PBXContainerItemProxy */;
}; };
E240392D1BA09207000B7089 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CEE28CD01AE004D800F4023C /* GCDWebServers (Mac) */;
targetProxy = E240392C1BA09207000B7089 /* PBXContainerItemProxy */;
};
E274F87B187E77E3009E0582 /* PBXTargetDependency */ = { E274F87B187E77E3009E0582 /* PBXTargetDependency */ = {
isa = PBXTargetDependency; isa = PBXTargetDependency;
target = 8DD76FA90486AB0100D96B5E /* GCDWebServer (Mac) */; target = 8DD76FA90486AB0100D96B5E /* GCDWebServer (Mac) */;
@@ -820,6 +871,7 @@
1DEB928A08733DD80010E9CD /* Debug */ = { 1DEB928A08733DD80010E9CD /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
BUNDLE_VERSION_STRING = 3.2.6;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
@@ -827,6 +879,7 @@
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = __GCDWEBSERVER_ENABLE_TESTING__; GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = __GCDWEBSERVER_ENABLE_TESTING__;
HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2"; HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "net.pol-online.GCDWebServers";
WARNING_CFLAGS = ( WARNING_CFLAGS = (
"-Wall", "-Wall",
"-Weverything", "-Weverything",
@@ -845,6 +898,9 @@
"-Wno-documentation-unknown-command", "-Wno-documentation-unknown-command",
"-Wno-objc-missing-property-synthesis", "-Wno-objc-missing-property-synthesis",
"-Wno-cstring-format-directive", "-Wno-cstring-format-directive",
"-Wno-reserved-id-macro",
"-Wno-cast-qual",
"-Wno-nullable-to-nonnull-conversion",
); );
}; };
name = Debug; name = Debug;
@@ -852,11 +908,13 @@
1DEB928B08733DD80010E9CD /* Release */ = { 1DEB928B08733DD80010E9CD /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
BUNDLE_VERSION_STRING = 3.2.6;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = __GCDWEBSERVER_ENABLE_TESTING__; GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = __GCDWEBSERVER_ENABLE_TESTING__;
GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES;
HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2"; HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
PRODUCT_BUNDLE_IDENTIFIER = "net.pol-online.GCDWebServers";
WARNING_CFLAGS = "-Wall"; WARNING_CFLAGS = "-Wall";
}; };
name = Release; name = Release;
@@ -868,7 +926,7 @@
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Frameworks/Info.plist"; INFOPLIST_FILE = Frameworks/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7; MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = GCDWebServers; PRODUCT_NAME = GCDWebServers;
@@ -883,7 +941,7 @@
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Frameworks/Info.plist"; INFOPLIST_FILE = Frameworks/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7; MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = GCDWebServers; PRODUCT_NAME = GCDWebServers;
@@ -899,7 +957,7 @@
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Frameworks/Info.plist"; INFOPLIST_FILE = Frameworks/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = GCDWebServers; PRODUCT_NAME = GCDWebServers;
@@ -916,7 +974,7 @@
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Frameworks/Info.plist"; INFOPLIST_FILE = Frameworks/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = GCDWebServers; PRODUCT_NAME = GCDWebServers;
@@ -929,6 +987,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = iOS/Info.plist; INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 5.0;
PRODUCT_NAME = GCDWebServer; PRODUCT_NAME = GCDWebServer;
@@ -942,6 +1001,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = iOS/Info.plist; INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 5.0;
PRODUCT_NAME = GCDWebServer; PRODUCT_NAME = GCDWebServer;
@@ -951,6 +1011,42 @@
}; };
name = Release; name = Release;
}; };
E240392F1BA09207000B7089 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = Tests;
SDKROOT = macosx;
WARNING_CFLAGS = (
"$(inherited)",
"-Wno-gnu-zero-variadic-macro-arguments",
);
};
name = Debug;
};
E24039301BA09207000B7089 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = Tests;
SDKROOT = macosx;
WARNING_CFLAGS = (
"$(inherited)",
"-Wno-gnu-zero-variadic-macro-arguments",
);
};
name = Release;
};
E274F877187E77D8009E0582 /* Debug */ = { E274F877187E77D8009E0582 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
@@ -1013,6 +1109,15 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
E240392E1BA09207000B7089 /* Build configuration list for PBXNativeTarget "Tests (Mac)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E240392F1BA09207000B7089 /* Debug */,
E24039301BA09207000B7089 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E274F879187E77D8009E0582 /* Build configuration list for PBXAggregateTarget "Build All" */ = { E274F879187E77D8009E0582 /* Build configuration list for PBXAggregateTarget "Build All" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0630" LastUpgradeVersion = "0700"
version = "1.3"> version = "1.8">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"> buildImplicitDependencies = "YES">
<BuildActionEntries> <BuildActionEntries>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "NO"
buildForRunning = "YES" buildForRunning = "NO"
buildForProfiling = "YES" buildForProfiling = "YES"
buildForArchiving = "YES" buildForArchiving = "YES"
buildForAnalyzing = "YES"> buildForAnalyzing = "YES">
@@ -28,7 +28,19 @@
shouldUseLaunchSchemeArgsEnv = "YES" shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug"> buildConfiguration = "Debug">
<Testables> <Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E24039241BA09207000B7089"
BuildableName = "Tests.xctest"
BlueprintName = "Tests (Mac)"
ReferencedContainer = "container:GCDWebServer.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables> </Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -38,16 +50,8 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES" debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"> allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CEE28CD01AE004D800F4023C"
BuildableName = "GCDWebServers.framework"
BlueprintName = "GCDWebServers (Mac)"
ReferencedContainer = "container:GCDWebServer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions> <AdditionalOptions>
</AdditionalOptions> </AdditionalOptions>
</LaunchAction> </LaunchAction>

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0630" LastUpgradeVersion = "0700"
version = "1.3"> version = "1.8">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"> buildImplicitDependencies = "YES">
<BuildActionEntries> <BuildActionEntries>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "NO"
buildForRunning = "YES" buildForRunning = "NO"
buildForProfiling = "YES" buildForProfiling = "YES"
buildForArchiving = "YES" buildForArchiving = "YES"
buildForAnalyzing = "YES"> buildForAnalyzing = "YES">
@@ -29,16 +29,6 @@
buildConfiguration = "Debug"> buildConfiguration = "Debug">
<Testables> <Testables>
</Testables> </Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion> <MacroExpansion>
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
@@ -50,6 +40,19 @@
</MacroExpansion> </MacroExpansion>
<AdditionalOptions> <AdditionalOptions>
</AdditionalOptions> </AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction> </LaunchAction>
<ProfileAction <ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES" shouldUseLaunchSchemeArgsEnv = "YES"

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
@@ -463,18 +463,18 @@ static inline NSString* _EncodeBase64(NSString* string) {
dispatch_source_set_event_handler(source, ^{ dispatch_source_set_event_handler(source, ^{
@autoreleasepool { @autoreleasepool {
struct sockaddr remoteSockAddr; struct sockaddr_storage remoteSockAddr;
socklen_t remoteAddrLen = sizeof(remoteSockAddr); socklen_t remoteAddrLen = sizeof(remoteSockAddr);
int socket = accept(listeningSocket, &remoteSockAddr, &remoteAddrLen); int socket = accept(listeningSocket, (struct sockaddr*)&remoteSockAddr, &remoteAddrLen);
if (socket > 0) { if (socket > 0) {
NSData* remoteAddress = [NSData dataWithBytes:&remoteSockAddr length:remoteAddrLen]; NSData* remoteAddress = [NSData dataWithBytes:&remoteSockAddr length:remoteAddrLen];
struct sockaddr localSockAddr; struct sockaddr_storage localSockAddr;
socklen_t localAddrLen = sizeof(localSockAddr); socklen_t localAddrLen = sizeof(localSockAddr);
NSData* localAddress = nil; NSData* localAddress = nil;
if (getsockname(socket, &localSockAddr, &localAddrLen) == 0) { if (getsockname(socket, (struct sockaddr*)&localSockAddr, &localAddrLen) == 0) {
localAddress = [NSData dataWithBytes:&localSockAddr length:localAddrLen]; localAddress = [NSData dataWithBytes:&localSockAddr length:localAddrLen];
GWS_DCHECK((!isIPv6 && localSockAddr.sa_family == AF_INET) || (isIPv6 && localSockAddr.sa_family == AF_INET6)); GWS_DCHECK((!isIPv6 && localSockAddr.ss_family == AF_INET) || (isIPv6 && localSockAddr.ss_family == AF_INET6));
} else { } else {
GWS_DNOT_REACHED(); GWS_DNOT_REACHED();
} }
@@ -511,11 +511,10 @@ static inline NSString* _EncodeBase64(NSString* string) {
return NO; return NO;
} }
if (port == 0) { if (port == 0) {
struct sockaddr addr; struct sockaddr_in addr;
socklen_t addrlen = sizeof(addr); socklen_t addrlen = sizeof(addr);
if (getsockname(listeningSocket4, &addr, &addrlen) == 0) { if (getsockname(listeningSocket4, (struct sockaddr*)&addr, &addrlen) == 0) {
struct sockaddr_in* sockaddr = (struct sockaddr_in*)&addr; port = ntohs(addr.sin_port);
port = ntohs(sockaddr->sin_port);
} else { } else {
GWS_LOG_ERROR(@"Failed retrieving socket address: %s (%i)", strerror(errno), errno); GWS_LOG_ERROR(@"Failed retrieving socket address: %s (%i)", strerror(errno), errno);
} }

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
<!-- <!--
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -58,13 +58,20 @@ pod "GCDWebServer/WebDAV", "~> 3.0"
And finally run `$ pod install`. And finally run `$ pod install`.
You can also use [Carthage](https://github.com/Carthage/Carthage) by adding this line to your Cartfile: You can also use [Carthage](https://github.com/Carthage/Carthage) by adding this line to your Cartfile (3.2.5 is the first release with Carthage support):
``` ```
github "swisspol/GCDWebServer" "master" github "swisspol/GCDWebServer" ~> 3.2.5
``` ```
Then run `$ carthage update` and add the generated frameworks to your Xcode projects (see [Carthage instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)). Then run `$ carthage update` and add the generated frameworks to your Xcode projects (see [Carthage instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)).
Help & Support
==============
For help with using GCDWebServer, it's best to ask your question on Stack Overflow with the [`gcdwebserver`](http://stackoverflow.com/questions/tagged/gcdwebserver) tag. Be sure to read this entire README first though!
For bug reports or enhancement requests, please use [GitHub issues](https://github.com/swisspol/GCDWebServer/issues) instead.
Hello World Hello World
=========== ===========
@@ -143,22 +150,27 @@ int main(int argc, const char* argv[]) {
***webServer.swift*** ***webServer.swift***
```swift ```swift
import Foundation import Foundation
import GCDWebServers
let webServer = GCDWebServer() func initWebServer() {
webServer.addDefaultHandlerForMethod("GET", requestClass: GCDWebServerRequest.self, processBlock: {request in let webServer = GCDWebServer()
webServer.addDefaultHandlerForMethod("GET", requestClass: GCDWebServerRequest.self, processBlock: {request in
return GCDWebServerDataResponse(HTML:"<html><body><p>Hello World</p></body></html>") return GCDWebServerDataResponse(HTML:"<html><body><p>Hello World</p></body></html>")
})
webServer.runWithPort(8080, bonjourName: "GCD Web Server")
print("Visit \(webServer.serverURL) in your web browser")
} }
webServer.runWithPort(8080, bonjourName: nil)
println("Visit \(webServer.serverURL) in your web browser")
``` ```
***WebServer-Bridging-Header.h*** ***WebServer-Bridging-Header.h***
```objectivec ```objectivec
#import "GCDWebServer.h" #import <GCDWebServers/GCDWebServer.h>
#import "GCDWebServerDataResponse.h" #import <GCDWebServers/GCDWebServerDataResponse.h>
``` ```
Web Based Uploads in iOS Apps Web Based Uploads in iOS Apps

View File

@@ -6,11 +6,15 @@ if [ -z "$TRAVIS" ]; then
else else
IOS_SDK="iphonesimulator" IOS_SDK="iphonesimulator"
fi fi
OSX_SDK_VERSION=`xcodebuild -version -sdk | grep -A 1 '^MacOSX' | tail -n 1 | awk '{ print $2 }'`
IOS_SDK_VERSION=`xcodebuild -version -sdk | grep -A 1 '^iPhone' | tail -n 1 | awk '{ print $2 }'`
OSX_TARGET="GCDWebServer (Mac)" OSX_TARGET="GCDWebServer (Mac)"
IOS_TARGET="GCDWebServer (iOS)" IOS_TARGET="GCDWebServer (iOS)"
CONFIGURATION="Release" CONFIGURATION="Release"
OSX_TEST_SCHEME="GCDWebServers (Mac)"
BUILD_DIR="/tmp/GCDWebServer-Build" BUILD_DIR="/tmp/GCDWebServer-Build"
PRODUCT="$BUILD_DIR/$CONFIGURATION/GCDWebServer" PRODUCT="$BUILD_DIR/$CONFIGURATION/GCDWebServer"
@@ -30,21 +34,25 @@ function runTests {
logLevel=2 $1 -mode "$2" -root "$PAYLOAD_DIR/Payload" -tests "$3" logLevel=2 $1 -mode "$2" -root "$PAYLOAD_DIR/Payload" -tests "$3"
} }
# Build for iOS for oldest deployment target (TODO: run tests on iOS) # Run built-in OS X tests
rm -rf "$BUILD_DIR" rm -rf "$BUILD_DIR"
xcodebuild -sdk "$IOS_SDK" -target "$IOS_TARGET" -configuration "$CONFIGURATION" build "SYMROOT=$BUILD_DIR" "IPHONEOS_DEPLOYMENT_TARGET=5.1.1" > /dev/null xcodebuild test -scheme "$OSX_TEST_SCHEME" "SYMROOT=$BUILD_DIR"
# Build for iOS for default deployment target (TODO: run tests on iOS) # Build for iOS for oldest supported deployment target (TODO: run tests on iOS)
rm -rf "$BUILD_DIR" rm -rf "$BUILD_DIR"
xcodebuild -sdk "$IOS_SDK" -target "$IOS_TARGET" -configuration "$CONFIGURATION" build "SYMROOT=$BUILD_DIR" > /dev/null xcodebuild build -sdk "$IOS_SDK" -target "$IOS_TARGET" -configuration "$CONFIGURATION" "SYMROOT=$BUILD_DIR" "IPHONEOS_DEPLOYMENT_TARGET=5.1.1" > /dev/null
# Build for OS X for oldest deployment target # Build for iOS for current deployment target (TODO: run tests on iOS)
rm -rf "$BUILD_DIR" rm -rf "$BUILD_DIR"
xcodebuild -sdk "$OSX_SDK" -target "$OSX_TARGET" -configuration "$CONFIGURATION" build "SYMROOT=$BUILD_DIR" "MACOSX_DEPLOYMENT_TARGET=10.7" > /dev/null xcodebuild build -sdk "$IOS_SDK" -target "$IOS_TARGET" -configuration "$CONFIGURATION" "SYMROOT=$BUILD_DIR" "IPHONEOS_DEPLOYMENT_TARGET=$IOS_SDK_VERSION" > /dev/null
# Build for OS X for default deployment target # Build for OS X for oldest supported deployment target
rm -rf "$BUILD_DIR" rm -rf "$BUILD_DIR"
xcodebuild -sdk "$OSX_SDK" -target "$OSX_TARGET" -configuration "$CONFIGURATION" build "SYMROOT=$BUILD_DIR" > /dev/null xcodebuild build -sdk "$OSX_SDK" -target "$OSX_TARGET" -configuration "$CONFIGURATION" "SYMROOT=$BUILD_DIR" "MACOSX_DEPLOYMENT_TARGET=10.7" > /dev/null
# Build for OS X for current deployment target
rm -rf "$BUILD_DIR"
xcodebuild build -sdk "$OSX_SDK" -target "$OSX_TARGET" -configuration "$CONFIGURATION" "SYMROOT=$BUILD_DIR" "MACOSX_DEPLOYMENT_TARGET=$OSX_SDK_VERSION" > /dev/null
# Run tests # Run tests
runTests $PRODUCT "htmlForm" "Tests/HTMLForm" runTests $PRODUCT "htmlForm" "Tests/HTMLForm"

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -1,5 +1,5 @@
/* /*
Copyright (c) 2012-2014, Pierre-Olivier Latour Copyright (c) 2012-2015, Pierre-Olivier Latour
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without