public
Description: A cross-platform web server that's scripted with Nu.
Homepage: http://programming.nu
Clone URL: git://github.com/timburks/nunja.git
Support for attributes on the automatically-generated BODY tag.
timburks (author)
Sat Jun 14 23:14:24 -0700 2008
commit  2a8ff574caa963aa7cac2a0be864ab0ca6365901
tree    3cf936e471745060b7b9049661bda5cdc5ddce4b
parent  519b58a154a1a653c41463bf1c723986f0090835
...
184
185
186
187
 
 
 
 
 
 
 
188
189
 
190
191
192
...
184
185
186
 
187
188
189
190
191
192
193
194
 
195
196
197
198
0
@@ -184,9 +184,15 @@
0
                    (if (response "TITLE")
0
                        (then (html appendString:(+ "\n<title>" (response "TITLE") "</title>")))
0
                        (else (if TITLE (html appendString:(+ "\n<title>" TITLE "</title>")))))
0
- (html appendString: (+ "</head>\n<body>\n" BODY "\n</body>\n</html>\n"))
0
+ (set bodyAttributes (response "BODY_ATTRIBUTES"))
0
+ (html appendString:"</head>\n")
0
+ (if bodyAttributes
0
+ (then (html appendString:"<body #{bodyAttributes}>\n"))
0
+ (else (html appendString:"<body>\n")))
0
+ (html appendString:BODY)
0
+ (html appendString:"\n</body>\n</html>\n")
0
                    (request respondWithString:html))))
0
-
0
+
0
      ;; Return a response redirecting the client to a new location. This method may be called from action handlers.
0
      (- (id)redirectResponse:(id)request toLocation:(id)location is
0
         (request setValue:location forResponseHeader:"Location")

Comments

    No one has commented yet.