[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
virtual host support
From: |
Jose Roberto B. de A. Monteiro |
Subject: |
virtual host support |
Date: |
Thu, 27 Feb 2003 13:50:39 -0300 |
Hello there,
In guile-www package: in http:request procedure, I am sending a patch
to support virtual hosts retrieving.
The patch is bellow.
In cases of a single host supporting many other virtual hosts, the
previous http:request retrieves the main host page.
Regards,
Jose Roberto Monteiro
===File ~/work/guile/guile-1.7.0/guile-www.diff=============
Common subdirectories: guile-www.orig/CVS and guile-www/CVS
Common subdirectories: guile-www.orig/contrib and guile-www/contrib
Common subdirectories: guile-www.orig/doc and guile-www/doc
Common subdirectories: guile-www.orig/examples and guile-www/examples
diff -u guile-www.orig/http.scm guile-www/http.scm
--- guile-www.orig/http.scm Fri Apr 26 22:57:28 2002
+++ guile-www/http.scm Thu Feb 27 13:43:16 2003
@@ -216,7 +216,7 @@
(tcp-port (or (url:port url) 80))
(path (format #f "/~A" (or (url:path url) ""))))
(let ((sock (http:open host tcp-port))
- (request (format #f "~A ~A ~A" method path http:version))
+ (request (format #f "~A ~A ~A\r\nHost: ~A" method path http:version
(url:host url)))
(headers (if (pair? args) (car args) '()))
(body (if (and (pair? args) (pair? (cdr args)))
(cadr args)
============================================================
- virtual host support,
Jose Roberto B. de A. Monteiro <=