http.server: Actually use the port remapping instead of throwing it away.
For a port 8080 remapped to port 80, the ``or`` in this line looks like ``8080 80 or`` which doesn't get the remapped port. Fixes #692 and #1992.paths
parent
33a1b7625e
commit
06e85cc606
|
@ -1,36 +1,14 @@
|
||||||
! Copyright (C) 2003, 2010 Slava Pestov.
|
! Copyright (C) 2003, 2010 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel accessors sequences arrays namespaces splitting
|
USING: accessors arrays assocs combinators
|
||||||
vocabs.loader destructors assocs debugger continuations
|
combinators.short-circuit continuations debugger destructors fry
|
||||||
combinators combinators.short-circuit vocabs.refresh
|
hashtables html html.streams html.templates http
|
||||||
tools.time math present vectors hashtables
|
http.server.remapping http.server.requests http.server.responses
|
||||||
io
|
io io.crlf io.encodings io.encodings.ascii io.encodings.iana
|
||||||
io.sockets
|
io.encodings.utf8 io.servers io.sockets io.sockets.secure
|
||||||
io.sockets.secure
|
io.streams.limited kernel logging logging.insomniac math
|
||||||
io.encodings
|
mime.types namespaces present sequences splitting tools.time
|
||||||
io.encodings.iana
|
urls vectors vocabs vocabs.refresh xml.writer ;
|
||||||
io.encodings.utf8
|
|
||||||
io.encodings.ascii
|
|
||||||
io.encodings.binary
|
|
||||||
io.streams.limited
|
|
||||||
io.streams.string
|
|
||||||
io.streams.throwing
|
|
||||||
io.servers
|
|
||||||
io.timeouts
|
|
||||||
io.crlf
|
|
||||||
fry logging logging.insomniac calendar urls
|
|
||||||
unicode
|
|
||||||
http
|
|
||||||
http.server.requests
|
|
||||||
http.server.responses
|
|
||||||
http.server.remapping
|
|
||||||
html.templates
|
|
||||||
html.streams
|
|
||||||
html
|
|
||||||
mime.types
|
|
||||||
math.order
|
|
||||||
xml.writer
|
|
||||||
vocabs ;
|
|
||||||
IN: http.server
|
IN: http.server
|
||||||
|
|
||||||
GENERIC: write-response ( response -- )
|
GENERIC: write-response ( response -- )
|
||||||
|
@ -187,7 +165,7 @@ SYMBOL: params
|
||||||
[
|
[
|
||||||
local-address get
|
local-address get
|
||||||
[ secure? "https" "http" ? >>protocol ]
|
[ secure? "https" "http" ? >>protocol ]
|
||||||
[ port>> remap-port '[ _ or ] change-port ]
|
[ port>> remap-port >>port ]
|
||||||
bi
|
bi
|
||||||
] change-url drop ;
|
] change-url drop ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue