Subject: bug#15227: Possible bug in (web server)

From: Matt Wette <[email-masked]>
Date: Sat, 29 Apr 2017 13:38:28 -0700

I tried this on guile 2.2.0 and the localhost queries seem to work OK. — Matt

mwette$ ./15227 server
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /Users/mwette/proj/scheme/guile/bugs-guile/./15227
;;; compiled /Users/mwette/.cache/guile/ccache/2.2-LE-8-3.9/Users/mwette/proj/scheme/guile/bugs-guile/15227.go
Web server replied 'Hello World! 0'.
Web server replied 'Hello World! 1'.
Web server replied 'Hello World! 2'.
Web server replied 'Hello World! 3'.

mwette$ ./15227 client
Getting http://gnu.org... response #<<response> version: (1 . 1) code: 301 reason-phrase: "Moved Permanently" headers: ((date . #<date nanosecond: 0 second: 12 minute: 33 hour: 20 day: 29 month: 4 year: 2017 zone-offset: 0>) (server . "Apache/2.4.7") (location . #<<uri> scheme: http userinfo: #f host: "www.gnu.org" port: #f path: "/" query: #f fragment: #f>) (content-length . 290) (connection close) (content-type text/html (charset . "iso-8859-1"))) port: #<closed: file 1021b0690>>

Getting http://fsf.org... response #<<response> version: (1 . 0) code: 301 reason-phrase: "Moved Permanently" headers: ((server . "nginx/1.1.19") (date . #<date nanosecond: 0 second: 42 minute: 36 hour: 20 day: 29 month: 4 year: 2017 zone-offset: 0>) (content-type text/html) (content-length . 185) (location . #<<uri> scheme: http userinfo: #f host: "www.fsf.org" port: #f path: "/" query: #f fragment: #f>) (x-cache . "MISS from www.fsforg") (x-cache-lookup . "MISS from www.fsforg:80") (via "1.0 www.fsforg (squid/3.1.19)") (connection close)) port: #<closed: file 1021b03f0>>

Getting http://localhost:8080... response #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((content-length . 14) (content-type text/plain (charset . "utf-8"))) port: #<closed: file 1021b0000>>

Getting http://localhost:8080... response #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((content-length . 14) (content-type text/plain (charset . "utf-8"))) port: #<closed: file 1022d1c40>>

mwette$ ./15227 client
Getting http://gnu.org... response #<<response> version: (1 . 1) code: 301 reason-phrase: "Moved Permanently" headers: ((date . #<date nanosecond: 0 second: 28 minute: 33 hour: 20 day: 29 month: 4 year: 2017 zone-offset: 0>) (server . "Apache/2.4.7") (location . #<<uri> scheme: http userinfo: #f host: "www.gnu.org" port: #f path: "/" query: #f fragment: #f>) (content-length . 290) (connection close) (content-type text/html (charset . "iso-8859-1"))) port: #<closed: file 107eb9690>>

Getting http://fsf.org... response #<<response> version: (1 . 0) code: 301 reason-phrase: "Moved Permanently" headers: ((server . "nginx/1.1.19") (date . #<date nanosecond: 0 second: 58 minute: 36 hour: 20 day: 29 month: 4 year: 2017 zone-offset: 0>) (content-type text/html) (content-length . 185) (location . #<<uri> scheme: http userinfo: #f host: "www.fsf.org" port: #f path: "/" query: #f fragment: #f>) (x-cache . "MISS from www.fsforg") (x-cache-lookup . "MISS from www.fsforg:80") (via "1.0 www.fsforg (squid/3.1.19)") (connection close)) port: #<closed: file 107eb93f0>>

Getting http://localhost:8080... response #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((content-length . 14) (content-type text/plain (charset . "utf-8"))) port: #<closed: file 107eb9000>>

Getting http://localhost:8080... response #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((content-length . 14) (content-type text/plain (charset . "utf-8"))) port: #<closed: file 107fd9c40>>

mwette$ uname -a
Darwin nautilus 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar  3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

mwette$ guile22 --version
guile (GNU Guile) 2.2.0
Copyright (C) 2017 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.