To give more details on Loki's post:

Essentially you'd return the content of the response(that is the response saying to redirect to another resource) to $urlget the same way you would if the host had returned a 200 OK response

Assume the following client<->server interaction takes place
Code
<- GET / HTTP/1.1
<- Host: site.com

-> HTTP/1.1 302 Found
-> Location: https://site.com/index.html
-> Content-Length: 0


With the above assumption, the following would occur
Code
alias example {

  ;; R0 indicates no redirects should be followed
  noop $urlget(https://site.com, gbR0, &bvar, example_callback)
}

alias example_callback {

  ;; Reply: HTTP/1.1 302 Found\r\nLocation: https://site.com/index.html\r\nContent-Length: 0
  echo -ag Reply: $urlget($1).reply
}

Last edited by FroggieDaFrog; 22/10/20 01:44 AM.

I am SReject
My Stuff