src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/RedirectFilter.java
equal
deleted
inserted
replaced
34 |
34 |
35 HttpRequestImpl request; |
35 HttpRequestImpl request; |
36 HttpClientImpl client; |
36 HttpClientImpl client; |
37 HttpClient.Redirect policy; |
37 HttpClient.Redirect policy; |
38 String method; |
38 String method; |
39 MultiExchange<?,?> exchange; |
39 MultiExchange<?> exchange; |
40 static final int DEFAULT_MAX_REDIRECTS = 5; |
40 static final int DEFAULT_MAX_REDIRECTS = 5; |
41 URI uri; |
41 URI uri; |
42 |
42 |
43 static final int max_redirects = Utils.getIntegerNetProperty( |
43 static final int max_redirects = Utils.getIntegerNetProperty( |
44 "jdk.httpclient.redirects.retrylimit", DEFAULT_MAX_REDIRECTS |
44 "jdk.httpclient.redirects.retrylimit", DEFAULT_MAX_REDIRECTS |
46 |
46 |
47 // A public no-arg constructor is required by FilterFactory |
47 // A public no-arg constructor is required by FilterFactory |
48 public RedirectFilter() {} |
48 public RedirectFilter() {} |
49 |
49 |
50 @Override |
50 @Override |
51 public synchronized void request(HttpRequestImpl r, MultiExchange<?,?> e) throws IOException { |
51 public synchronized void request(HttpRequestImpl r, MultiExchange<?> e) throws IOException { |
52 this.request = r; |
52 this.request = r; |
53 this.client = e.client(); |
53 this.client = e.client(); |
54 this.policy = client.followRedirects(); |
54 this.policy = client.followRedirects(); |
55 |
55 |
56 this.method = r.method(); |
56 this.method = r.method(); |