public
Description: A cross-platform web server that's scripted with Nu.
Homepage: http://programming.nu
Clone URL: git://github.com/timburks/nunja.git
Search Repo:
Added licensing information and README file.
timburks (author)
Mon Mar 10 16:34:46 -0700 2008
commit  d7be03a41e3779c9afb73cdda6fc1363dc538b5f
tree    2fb77bc9bb317d51b0436732a2c190564c8ba10f
parent  015b0853b9a5af882c0d215bb1e78eba7d3e90e6
...
1
2
 
3
4
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
1
2
3
4
 
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -1,7 +1,18 @@
0
 ;; @file mime.nu
0
 ;; @discussion MIME types known to Nunja.
0
+;; @copyright Copyright (c) 2008 Neon Design Technology, Inc.
0
 ;;
0
-;; @copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
0
+;; Licensed under the Apache License, Version 2.0 (the "License");
0
+;; you may not use this file except in compliance with the License.
0
+;; You may obtain a copy of the License at
0
+;;
0
+;; http://www.apache.org/licenses/LICENSE-2.0
0
+;;
0
+;; Unless required by applicable law or agreed to in writing, software
0
+;; distributed under the License is distributed on an "AS IS" BASIS,
0
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0
+;; See the License for the specific language governing permissions and
0
+;; limitations under the License.
0
 
0
 (set MIME-TYPES
0
      (dict "ai" "application/postscript"
...
1
2
 
3
4
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
1
2
3
4
 
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -1,7 +1,18 @@
0
 ;; @file nunja.nu
0
 ;; @discussion Nu components of the Nunja web server.
0
+;; @copyright Copyright (c) 2008 Neon Design Technology, Inc.
0
 ;;
0
-;; @copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
0
+;; Licensed under the Apache License, Version 2.0 (the "License");
0
+;; you may not use this file except in compliance with the License.
0
+;; You may obtain a copy of the License at
0
+;;
0
+;; http://www.apache.org/licenses/LICENSE-2.0
0
+;;
0
+;; Unless required by applicable law or agreed to in writing, software
0
+;; distributed under the License is distributed on an "AS IS" BASIS,
0
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0
+;; See the License for the specific language governing permissions and
0
+;; limitations under the License.
0
 
0
 ;; import some useful C functions
0
 (global random (NuBridgedFunction functionWithName:"random" signature:"l"))
0
...
3
4
5
6
 
 
 
 
 
 
 
 
 
 
 
 
 
7
8
9
...
3
4
5
 
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
0
@@ -3,7 +3,19 @@
0
 # @file nunjad
0
 # The Nunja daemon.
0
 #
0
-# @copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
0
+# @copyright Copyright (c) 2008 Neon Design Technology, Inc.
0
+#
0
+# Licensed under the Apache License, Version 2.0 (the "License");
0
+# you may not use this file except in compliance with the License.
0
+# You may obtain a copy of the License at
0
+#
0
+# http://www.apache.org/licenses/LICENSE-2.0
0
+#
0
+# Unless required by applicable law or agreed to in writing, software
0
+# distributed under the License is distributed on an "AS IS" BASIS,
0
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0
+# See the License for the specific language governing permissions and
0
+# limitations under the License.
0
 
0
 (load "Nunja")
0
 
...
1
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
26
27
28
29
30
...
1
 
 
 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
38
39
40
 
 
0
@@ -1,7 +1,19 @@
0
 /*!
0
- @header helpers.h
0
- @copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
0
- @discussion General utilities for the Nunja web server.
0
+@header helpers.h
0
+@discussion General utilities for the Nunja web server.
0
+@copyright Copyright (c) 2008 Neon Design Technology, Inc.
0
+
0
+Licensed under the Apache License, Version 2.0 (the "License");
0
+you may not use this file except in compliance with the License.
0
+You may obtain a copy of the License at
0
+
0
+http://www.apache.org/licenses/LICENSE-2.0
0
+
0
+Unless required by applicable law or agreed to in writing, software
0
+distributed under the License is distributed on an "AS IS" BASIS,
0
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0
+See the License for the specific language governing permissions and
0
+limitations under the License.
0
 */
0
 
0
 #import <Foundation/Foundation.h>
0
@@ -26,5 +38,3 @@
0
 /*! Get a dictionary corresponding to a multipart-encoded message body. */
0
 - (NSDictionary *) multipartDictionaryWithBoundary:(NSString *) boundary;
0
 @end
0
-
0
-
...
1
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
42
43
44
45
 
46
47
48
49
 
 
 
50
51
52
...
65
66
67
68
 
69
70
71
72
 
 
 
73
74
75
76
77
 
78
79
 
80
81
 
82
83
84
...
1
 
 
 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
54
55
56
 
57
58
 
 
 
59
60
61
62
63
64
...
77
78
79
 
80
81
 
 
 
82
83
84
85
86
87
88
 
89
90
 
91
92
 
93
94
95
96
0
@@ -1,7 +1,19 @@
0
 /*!
0
- @file helpers.m
0
- @copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
0
- @discussion General utilities for the Nunja web server.
0
+@file helpers.m
0
+@discussion General utilities for the Nunja web server.
0
+@copyright Copyright (c) 2008 Neon Design Technology, Inc.
0
+
0
+Licensed under the Apache License, Version 2.0 (the "License");
0
+you may not use this file except in compliance with the License.
0
+You may obtain a copy of the License at
0
+
0
+http://www.apache.org/licenses/LICENSE-2.0
0
+
0
+Unless required by applicable law or agreed to in writing, software
0
+distributed under the License is distributed on an "AS IS" BASIS,
0
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0
+See the License for the specific language governing permissions and
0
+limitations under the License.
0
 */
0
 
0
 #import "helpers.h"
0
@@ -42,11 +54,11 @@ static char int_to_char[] = "0123456789ABCDEF";
0
     while (i < max) {
0
         unichar c = [self characterAtIndex:i++];
0
         if (iswalpha(c) || iswdigit(c) || (c == '-') || (c == '.') || (c == '_') || (c == '~'))
0
-#ifdef DARWIN
0
+ #ifdef DARWIN
0
             [result appendFormat:@"%C", c];
0
-#else
0
- [result appendFormat:@"%c", c];
0
-#endif
0
+ #else
0
+ [result appendFormat:@"%c", c];
0
+ #endif
0
         else
0
             [result appendString:[NSString stringWithFormat:@"%%%c%c", int_to_char[(c/16)%16], int_to_char[c%16]]];
0
     }
0
@@ -65,20 +77,20 @@ static char int_to_char[] = "0123456789ABCDEF";
0
                 [result appendString:@" "];
0
                 break;
0
             case '%':
0
-#ifdef DARWIN
0
+ #ifdef DARWIN
0
                 [result appendFormat:@"%C",
0
-#else
0
- [result appendFormat:@"%c",
0
-#endif
0
+ #else
0
+ [result appendFormat:@"%c",
0
+ #endif
0
                     char_to_int([self characterAtIndex:i++])*16
0
                     + char_to_int([self characterAtIndex:i++])];
0
                 break;
0
             default:
0
-#ifdef DARWIN
0
+ #ifdef DARWIN
0
                 [result appendFormat:@"%C", c];
0
-#else
0
+ #else
0
                 [result appendFormat:@"%c", c];
0
-#endif
0
+ #endif
0
         }
0
     }
0
     return result;
...
1
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
40
41
42
43
44
45
46
...
163
164
165
166
167
 
 
 
168
169
170
...
1
 
 
 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
52
53
54
 
55
56
57
...
174
175
176
 
 
177
178
179
180
181
182
0
@@ -1,7 +1,19 @@
0
 /*!
0
- @file nunja.m
0
- @copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
0
- @discussion Objective-C components of the Nunja web server.
0
+@file nunja.m
0
+@discussion Objective-C components of the Nunja web server.
0
+@copyright Copyright (c) 2008 Neon Design Technology, Inc.
0
+
0
+Licensed under the Apache License, Version 2.0 (the "License");
0
+you may not use this file except in compliance with the License.
0
+You may obtain a copy of the License at
0
+
0
+http://www.apache.org/licenses/LICENSE-2.0
0
+
0
+Unless required by applicable law or agreed to in writing, software
0
+distributed under the License is distributed on an "AS IS" BASIS,
0
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0
+See the License for the specific language governing permissions and
0
+limitations under the License.
0
 */
0
 
0
 #include <sys/types.h>
0
@@ -40,7 +52,6 @@
0
 
0
 void NunjaInit()
0
 {
0
-printf ("initializing\n");
0
     static initialized = 0;
0
     if (!initialized) {
0
         initialized = 1;
0
@@ -163,8 +174,9 @@ static void nunja_response_helper(struct evhttp_request *req, int code, NSString
0
 
0
 @implementation Nunja
0
 
0
-+ (void) load {
0
- NunjaInit();
0
++ (void) load
0
+{
0
+ NunjaInit();
0
 }
0
 
0
 static void nunja_request_handler(struct evhttp_request *req, void *nunja_pointer)
...
1
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
1
2
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -1,7 +1,18 @@
0
 ;; @file sample.nu
0
 ;; @discussion Sample site demonstrating the Nunja web server.
0
-;;
0
 ;; @copyright Copyright (c) 2008 Tim Burks, Neon Design Technology, Inc.
0
+;;
0
+;; Licensed under the Apache License, Version 2.0 (the "License");
0
+;; you may not use this file except in compliance with the License.
0
+;; You may obtain a copy of the License at
0
+;;
0
+;; http://www.apache.org/licenses/LICENSE-2.0
0
+;;
0
+;; Unless required by applicable law or agreed to in writing, software
0
+;; distributed under the License is distributed on an "AS IS" BASIS,
0
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0
+;; See the License for the specific language governing permissions and
0
+;; limitations under the License.
0
 
0
 ;; global variables
0
 (set $sessionCookies (dict))

Comments

    No one has commented yet.