Open GoogleCodeExporter opened 9 years ago
Original comment by tah...@gmail.com
on 9 Dec 2008 at 3:47
Implemented in r2979..
Original comment by alobbs
on 17 Mar 2009 at 4:12
Doesn't yet work in 0.99.22.
Original comment by praseodym
on 27 Sep 2009 at 12:46
Since we are at 0.99.24 and there is reply rewriting. What doesn't work?
Original comment by ste...@konink.de
on 27 Sep 2009 at 1:06
0.99.22 should have reply rewriting since it was released only a month ago. My
setup is Jetty with a Cherokee
HTTP reverse proxy. A sample request:
$ curl -i http://example.com/test
HTTP/1.1 302 Moved Temporarily
Connection: Keep-Alive
Keep-Alive: timeout=15
Transfer-Encoding: chunked
Date: Sun, 27 Sep 2009 14:44:59 GMT
Location: http://localhost:9920/test/
Server: Jetty(6.1.x)
Original comment by praseodym
on 27 Sep 2009 at 2:46
So did you configure reply rewriting ;)
Original comment by ste...@konink.de
on 27 Sep 2009 at 2:56
Hmm, I didn't know that I had to configure it manually. I don't really like how
it works though, manual find-
replace rules won't work with multiple hostnames. For what it's worth, nginx
handles the same situation without
problems.
Original comment by praseodym
on 27 Sep 2009 at 3:42
So in your ideal situation what should be replaced then? Since obviously you
could
rewrite the request, the redirect can contain internal and external hostnames,
so per
definition if you want to rewrite the request to something useful you have to
know
what you want to rewrite.
Original comment by ste...@konink.de
on 27 Sep 2009 at 3:45
For a request to http://example.com/test I'd expect it to be redirected to
http://example.com/test/, not
http://localhost:9920/test/. Since the proxied server is at localhost:9920,
Cherokee should be able to figure out
that a redirect there makes no sense, and instead rewrite it to the originally
requested domain.
Original comment by praseodym
on 27 Sep 2009 at 4:16
The location is generated by your 'backend' right? If the backend would
generate a
'valid' location you don't want to have it redirected. So I kind of think it is
completely 'correct' to set up a reply rewriter manually.
I wonder if it was the intention of r2979 to do this automatically.
Original comment by ste...@konink.de
on 27 Sep 2009 at 4:32
This is troublesome if I have one virtual host with multiple domains; how would
I rewrite it to the same domain?
The location is indeed generated by the backend as an internal redirection,
since it doesn't 'know' that it's being
proxied. An automatic method would solve most of the causes of wanting this
reply rewriting anyway.
Original comment by praseodym
on 27 Sep 2009 at 5:47
Original issue reported on code.google.com by
taher%sh...@gtempaccount.com
on 9 Dec 2008 at 3:46