SYMBOL: redirects
: redirect-url ( request url -- request )
- '[ , >url ensure-port derive-url ensure-port ] change-url ;
+ '[ , >url derive-url ensure-port ] change-url ;
: do-redirect ( response data -- response data )
over code>> 300 399 between? [
"http://localhost:1237/quit" http-get nip
] unit-test
+! HTTP client redirect bug
+[ ] [
+ [
+ <dispatcher>
+ add-quit-action
+ <action> [ "quit" <temporary-redirect> ] >>display
+ "redirect" add-responder
+ main-responder set
+
+ test-httpd
+ ] with-scope
+] unit-test
+
+[ "Goodbye" ] [
+ "http://localhost:1237/redirect" http-get nip
+] unit-test
+
+
+[ ] [
+ [ "http://localhost:1237/quit" http-get 2drop ] ignore-errors
+] unit-test
+
! Dispatcher bugs
[ ] [
[