java - Jetty responds with unnecessary redirect -
I use the Jetty-Maven-plugin to run my web application:
& Lt; Plugin & gt; & Lt; Group & gt; Org.mortbay.jetty & lt; / Group & gt; & Lt; ArtifactId & gt; Ghat-Maven-plugin & lt; / ArtifactId> & Lt; Version & gt; 8.1.12.v20130726 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Webapp & gt; & Lt; ContextPath & gt; / Test & lt; / ContextPath & gt; & Lt; / Webapp & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; Next, I use nginx for proxy requests:
server {server_name q.ru; 80 Listen; Location / {proxy_ http_version 1.1; Proxy_pass http://127.0.0.1:8080/ test; Proxy_set_header X-real-IP $ remote_adder; Proxy_set_header X-Forward- $ proxy_add_x_forwarded_for; }} Now, I open my browser, and send a request (local / my / etc / hosts). I get infinite redirection.
Here is an HTTP dialog dump for NTTN - JT; and JETTY response:
received / test hosted HTTP / 1.1: 127.0.0.1: 8080 Connection: Close User-agent: Mozilla / 5.0 (X11; Linux x86_64; rv: 24.0) Gecko / 20100101 Firefox / 24.0 Accept: text / html, application / xhtml + xml, application / xml; Q = 0.9, * / *; q = 0.8 Accept-Language: ru-ru, ru; Q = 0.8, N-US; Q = 0.5, N; q = 0.3 encoding-encoding: gzip, diffitt htp / 1.1 302 ml location: http: //127.0.0.1: 8080 / trial / connection: off server: jt (8.1.12.v20130726) Host and path are exactly specified in the request. So why does Jettie send 302 redirects?
I'm sure you can help me, I've been
Cheers
Comments
Post a Comment