summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2006-10-11 21:42:56 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2006-10-11 21:42:56 (GMT)
commitc6ba2cbcfd360e747bad4643cfdd11d8c62f064a (patch) (side-by-side diff)
tree491c683a271136288ca6db54be4dbeebfa862fe9
parent4b8a18740872e02c6361ebd478fdfb6f5736061e (diff)
downloadellinika-c6ba2cbcfd360e747bad4643cfdd11d8c62f064a.tar.gz
ellinika-c6ba2cbcfd360e747bad4643cfdd11d8c62f064a.tar.bz2
[IFACE!=CGI](cgi-server-hostname)
(cgi-server-protocol-name,cgi-server-protocol-version): New publics. git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@474 941c8c0f-9102-463b-b60b-cd22ce0e6858
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ellinika/cgi.scm417
1 files changed, 17 insertions, 0 deletions
diff --git a/ellinika/cgi.scm4 b/ellinika/cgi.scm4
index dc7c05d..a7ec2c4 100644
--- a/ellinika/cgi.scm4
+++ b/ellinika/cgi.scm4
@@ -40,6 +40,23 @@ ifelse(IFACE,[CGI],,dnl
(define-public cgi-script-name
(table:get (request-rec:subprocess-env Request)
"SCRIPT_NAME"))
+
+(define-public cgi-server-hostname
+ (table:get (request-rec:subprocess-env Request)
+ "SERVER_NAME"))
+
+(define-public cgi-server-protocol-name #f)
+(define-public cgi-server-protocol-version #f)
+
+(let* ((server-protocol (table:get (request-rec:subprocess-env Request)
+ "SERVER_PROTOCOL")))
+ (if server-protocol
+ (let ((slash (string-index server-protocol #\/)))
+ (set! cgi-server-protocol-name (substring server-protocol
+ 0 slash))
+ (set! cgi-server-protocol-version (substring server-protocol
+ (1+ slash))))))
+
)

Return to:

Send suggestions and report system problems to the System administrator.