summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--opentracker.xcodeproj/project.pbxproj106
-rw-r--r--ot_http.c4
3 files changed, 20 insertions, 91 deletions
diff --git a/Makefile b/Makefile
index b4bb5d2..d1709ee 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ BINDIR?=$(PREFIX)/bin
27#FEATURES+=-DWANT_SYNC_LIVE 27#FEATURES+=-DWANT_SYNC_LIVE
28#FEATURES+=-DWANT_IP_FROM_QUERY_STRING 28#FEATURES+=-DWANT_IP_FROM_QUERY_STRING
29#FEATURES+=-DWANT_COMPRESSION_GZIP 29#FEATURES+=-DWANT_COMPRESSION_GZIP
30#FEATURES+=-DWANT_COMPRESSION_GZIP_ALWAYS
30#FEATURES+=-DWANT_LOG_NETWORKS 31#FEATURES+=-DWANT_LOG_NETWORKS
31#FEATURES+=-DWANT_RESTRICT_STATS 32#FEATURES+=-DWANT_RESTRICT_STATS
32#FEATURES+=-DWANT_IP_FROM_PROXY 33#FEATURES+=-DWANT_IP_FROM_PROXY
diff --git a/opentracker.xcodeproj/project.pbxproj b/opentracker.xcodeproj/project.pbxproj
index f987055..3706a3f 100644
--- a/opentracker.xcodeproj/project.pbxproj
+++ b/opentracker.xcodeproj/project.pbxproj
@@ -39,7 +39,6 @@
39 39
40/* Begin PBXFileReference section */ 40/* Begin PBXFileReference section */
41 6520B7520D036AAF00A43B1F /* libowfat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libowfat.a; path = ../libowfat/libowfat.a; sourceTree = SOURCE_ROOT; }; 41 6520B7520D036AAF00A43B1F /* libowfat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libowfat.a; path = ../libowfat/libowfat.a; sourceTree = SOURCE_ROOT; };
42 6520B8110D0E011000A43B1F /* liblibowfat.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblibowfat.a; sourceTree = BUILT_PRODUCTS_DIR; };
43 653A320A0CE7F475007F0D03 /* ot_accesslist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ot_accesslist.h; sourceTree = "<group>"; }; 42 653A320A0CE7F475007F0D03 /* ot_accesslist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ot_accesslist.h; sourceTree = "<group>"; };
44 653A320B0CE7F475007F0D03 /* ot_accesslist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ot_accesslist.c; sourceTree = "<group>"; }; 43 653A320B0CE7F475007F0D03 /* ot_accesslist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ot_accesslist.c; sourceTree = "<group>"; };
45 653A56AC0CE201FF000CF140 /* opentracker */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = opentracker; sourceTree = BUILT_PRODUCTS_DIR; }; 44 653A56AC0CE201FF000CF140 /* opentracker */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = opentracker; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -70,13 +69,6 @@
70/* End PBXFileReference section */ 69/* End PBXFileReference section */
71 70
72/* Begin PBXFrameworksBuildPhase section */ 71/* Begin PBXFrameworksBuildPhase section */
73 654A80A60CD83615009035DE /* Frameworks */ = {
74 isa = PBXFrameworksBuildPhase;
75 buildActionMask = 2147483647;
76 files = (
77 );
78 runOnlyForDeploymentPostprocessing = 0;
79 };
80 8DD76FAD0486AB0100D96B5E /* Frameworks */ = { 72 8DD76FAD0486AB0100D96B5E /* Frameworks */ = {
81 isa = PBXFrameworksBuildPhase; 73 isa = PBXFrameworksBuildPhase;
82 buildActionMask = 2147483647; 74 buildActionMask = 2147483647;
@@ -93,6 +85,7 @@
93 children = ( 85 children = (
94 65542D810CE0786F00469330 /* Headers */, 86 65542D810CE0786F00469330 /* Headers */,
95 08FB7795FE84155DC02AAC07 /* Source */, 87 08FB7795FE84155DC02AAC07 /* Source */,
88 92762AC9104EDED700FDCB60 /* Libraries */,
96 C6A0FF2B0290797F04C91782 /* Documentation */, 89 C6A0FF2B0290797F04C91782 /* Documentation */,
97 653A56AD0CE201FF000CF140 /* Products */, 90 653A56AD0CE201FF000CF140 /* Products */,
98 ); 91 );
@@ -123,8 +116,6 @@
123 isa = PBXGroup; 116 isa = PBXGroup;
124 children = ( 117 children = (
125 653A56AC0CE201FF000CF140 /* opentracker */, 118 653A56AC0CE201FF000CF140 /* opentracker */,
126 6520B7520D036AAF00A43B1F /* libowfat.a */,
127 6520B8110D0E011000A43B1F /* liblibowfat.a */,
128 ); 119 );
129 name = Products; 120 name = Products;
130 sourceTree = "<group>"; 121 sourceTree = "<group>";
@@ -148,6 +139,14 @@
148 name = Headers; 139 name = Headers;
149 sourceTree = "<group>"; 140 sourceTree = "<group>";
150 }; 141 };
142 92762AC9104EDED700FDCB60 /* Libraries */ = {
143 isa = PBXGroup;
144 children = (
145 6520B7520D036AAF00A43B1F /* libowfat.a */,
146 );
147 name = Libraries;
148 sourceTree = "<group>";
149 };
151 C6A0FF2B0290797F04C91782 /* Documentation */ = { 150 C6A0FF2B0290797F04C91782 /* Documentation */ = {
152 isa = PBXGroup; 151 isa = PBXGroup;
153 children = ( 152 children = (
@@ -158,34 +157,7 @@
158 }; 157 };
159/* End PBXGroup section */ 158/* End PBXGroup section */
160 159
161/* Begin PBXHeadersBuildPhase section */
162 654A80A40CD83615009035DE /* Headers */ = {
163 isa = PBXHeadersBuildPhase;
164 buildActionMask = 2147483647;
165 files = (
166 );
167 runOnlyForDeploymentPostprocessing = 0;
168 };
169/* End PBXHeadersBuildPhase section */
170
171/* Begin PBXNativeTarget section */ 160/* Begin PBXNativeTarget section */
172 654A80A70CD83615009035DE /* libowfat */ = {
173 isa = PBXNativeTarget;
174 buildConfigurationList = 654A80AB0CD83635009035DE /* Build configuration list for PBXNativeTarget "libowfat" */;
175 buildPhases = (
176 654A80A40CD83615009035DE /* Headers */,
177 654A80A50CD83615009035DE /* Sources */,
178 654A80A60CD83615009035DE /* Frameworks */,
179 );
180 buildRules = (
181 );
182 dependencies = (
183 );
184 name = libowfat;
185 productName = libowfat;
186 productReference = 6520B8110D0E011000A43B1F /* liblibowfat.a */;
187 productType = "com.apple.product-type.library.static";
188 };
189 8DD76FA90486AB0100D96B5E /* opentracker */ = { 161 8DD76FA90486AB0100D96B5E /* opentracker */ = {
190 isa = PBXNativeTarget; 162 isa = PBXNativeTarget;
191 buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "opentracker" */; 163 buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "opentracker" */;
@@ -218,19 +190,11 @@
218 projectRoot = ""; 190 projectRoot = "";
219 targets = ( 191 targets = (
220 8DD76FA90486AB0100D96B5E /* opentracker */, 192 8DD76FA90486AB0100D96B5E /* opentracker */,
221 654A80A70CD83615009035DE /* libowfat */,
222 ); 193 );
223 }; 194 };
224/* End PBXProject section */ 195/* End PBXProject section */
225 196
226/* Begin PBXSourcesBuildPhase section */ 197/* Begin PBXSourcesBuildPhase section */
227 654A80A50CD83615009035DE /* Sources */ = {
228 isa = PBXSourcesBuildPhase;
229 buildActionMask = 2147483647;
230 files = (
231 );
232 runOnlyForDeploymentPostprocessing = 0;
233 };
234 8DD76FAB0486AB0100D96B5E /* Sources */ = { 198 8DD76FAB0486AB0100D96B5E /* Sources */ = {
235 isa = PBXSourcesBuildPhase; 199 isa = PBXSourcesBuildPhase;
236 buildActionMask = 2147483647; 200 buildActionMask = 2147483647;
@@ -290,7 +254,7 @@
290 1DEB928A08733DD80010E9CD /* Debug */ = { 254 1DEB928A08733DD80010E9CD /* Debug */ = {
291 isa = XCBuildConfiguration; 255 isa = XCBuildConfiguration;
292 buildSettings = { 256 buildSettings = {
293 ARCHS = "$(NATIVE_ARCH)"; 257 ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
294 GCC_PREPROCESSOR_DEFINITIONS = ( 258 GCC_PREPROCESSOR_DEFINITIONS = (
295 WANT_ACCESSLIST_WHITE, 259 WANT_ACCESSLIST_WHITE,
296 WANT_IP_FROM_QUERY_STRING, 260 WANT_IP_FROM_QUERY_STRING,
@@ -301,16 +265,16 @@
301 GCC_WARN_UNUSED_VARIABLE = YES; 265 GCC_WARN_UNUSED_VARIABLE = YES;
302 HEADER_SEARCH_PATHS = ../libowfat/; 266 HEADER_SEARCH_PATHS = ../libowfat/;
303 LIBRARY_SEARCH_PATHS = ../libowfat/; 267 LIBRARY_SEARCH_PATHS = ../libowfat/;
304 ONLY_ACTIVE_ARCH = YES; 268 ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)";
305 PREBINDING = NO; 269 PREBINDING = NO;
306 SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; 270 SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
307 }; 271 };
308 name = Debug; 272 name = Debug;
309 }; 273 };
310 1DEB928B08733DD80010E9CD /* Release */ = { 274 1DEB928B08733DD80010E9CD /* Release */ = {
311 isa = XCBuildConfiguration; 275 isa = XCBuildConfiguration;
312 buildSettings = { 276 buildSettings = {
313 ARCHS = "$(NATIVE_ARCH)"; 277 ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
314 DEAD_CODE_STRIPPING = NO; 278 DEAD_CODE_STRIPPING = NO;
315 GCC_PREPROCESSOR_DEFINITIONS = ( 279 GCC_PREPROCESSOR_DEFINITIONS = (
316 WANT_ACCESSLIST_WHITE, 280 WANT_ACCESSLIST_WHITE,
@@ -322,40 +286,9 @@
322 GCC_WARN_UNUSED_VARIABLE = YES; 286 GCC_WARN_UNUSED_VARIABLE = YES;
323 HEADER_SEARCH_PATHS = ../libowfat/; 287 HEADER_SEARCH_PATHS = ../libowfat/;
324 LIBRARY_SEARCH_PATHS = ../libowfat/; 288 LIBRARY_SEARCH_PATHS = ../libowfat/;
325 MACH_O_TYPE = mh_execute; 289 ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)";
326 ONLY_ACTIVE_ARCH = YES;
327 OTHER_LDFLAGS = "-lowfat";
328 PREBINDING = NO;
329 SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
330 ZERO_LINK = NO;
331 };
332 name = Release;
333 };
334 654A80A90CD83617009035DE /* Debug */ = {
335 isa = XCBuildConfiguration;
336 buildSettings = {
337 COPY_PHASE_STRIP = NO;
338 GCC_DYNAMIC_NO_PIC = NO;
339 GCC_ENABLE_FIX_AND_CONTINUE = YES;
340 GCC_MODEL_TUNING = G5;
341 GCC_OPTIMIZATION_LEVEL = 0;
342 INSTALL_PATH = /usr/local/lib;
343 PREBINDING = NO; 290 PREBINDING = NO;
344 PRODUCT_NAME = libowfat; 291 SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
345 ZERO_LINK = YES;
346 };
347 name = Debug;
348 };
349 654A80AA0CD83617009035DE /* Release */ = {
350 isa = XCBuildConfiguration;
351 buildSettings = {
352 COPY_PHASE_STRIP = YES;
353 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
354 GCC_ENABLE_FIX_AND_CONTINUE = NO;
355 GCC_MODEL_TUNING = G5;
356 INSTALL_PATH = /usr/local/lib;
357 PREBINDING = NO;
358 PRODUCT_NAME = libowfat;
359 ZERO_LINK = NO; 292 ZERO_LINK = NO;
360 }; 293 };
361 name = Release; 294 name = Release;
@@ -381,15 +314,6 @@
381 defaultConfigurationIsVisible = 0; 314 defaultConfigurationIsVisible = 0;
382 defaultConfigurationName = Release; 315 defaultConfigurationName = Release;
383 }; 316 };
384 654A80AB0CD83635009035DE /* Build configuration list for PBXNativeTarget "libowfat" */ = {
385 isa = XCConfigurationList;
386 buildConfigurations = (
387 654A80A90CD83617009035DE /* Debug */,
388 654A80AA0CD83617009035DE /* Release */,
389 );
390 defaultConfigurationIsVisible = 0;
391 defaultConfigurationName = Release;
392 };
393/* End XCConfigurationList section */ 317/* End XCConfigurationList section */
394 }; 318 };
395 rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; 319 rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
diff --git a/ot_http.c b/ot_http.c
index 97bf2ec..a14f950 100644
--- a/ot_http.c
+++ b/ot_http.c
@@ -219,11 +219,15 @@ static const ot_keywords keywords_format[] =
219 tai6464 t; 219 tai6464 t;
220#ifdef WANT_COMPRESSION_GZIP 220#ifdef WANT_COMPRESSION_GZIP
221 ws->request[ws->request_size] = 0; 221 ws->request[ws->request_size] = 0;
222#ifdef WANT_COMPRESSION_GZIP_ALWAYS
222 if( strstr( read_ptr - 1, "gzip" ) ) { 223 if( strstr( read_ptr - 1, "gzip" ) ) {
224#endif
223 cookie->flag |= STRUCT_HTTP_FLAG_GZIP; 225 cookie->flag |= STRUCT_HTTP_FLAG_GZIP;
224 format |= TASK_FLAG_GZIP; 226 format |= TASK_FLAG_GZIP;
227#ifdef WANT_COMPRESSION_GZIP_ALWAYS
225 } 228 }
226#endif 229#endif
230#endif
227 /* Pass this task to the worker thread */ 231 /* Pass this task to the worker thread */
228 cookie->flag |= STRUCT_HTTP_FLAG_WAITINGFORTASK; 232 cookie->flag |= STRUCT_HTTP_FLAG_WAITINGFORTASK;
229 233