mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
`write-request-line' writes absolute paths, not absolute URIs.
* module/web/http.scm (write-request-line): RFC 2616 says that absolute paths are used to identify resources on an origin server.
This commit is contained in:
parent
eaaf94c4ec
commit
ab66fb3cd1
1 changed files with 12 additions and 1 deletions
|
@ -1079,7 +1079,18 @@ three values: the method, the URI, and the version."
|
|||
"Write the first line of an HTTP request to @var{port}."
|
||||
(display method port)
|
||||
(display #\space port)
|
||||
(write-uri uri port)
|
||||
(let ((path (uri-path uri))
|
||||
(query (uri-query uri)))
|
||||
(if (not (string-null? path))
|
||||
(display path port))
|
||||
(if query
|
||||
(begin
|
||||
(display "?" port)
|
||||
(display query port)))
|
||||
(if (and (string-null? path)
|
||||
(not query))
|
||||
;; Make sure we display something.
|
||||
(display "/" port)))
|
||||
(display #\space port)
|
||||
(write-http-version version port)
|
||||
(display "\r\n" port))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue