-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEOS-8944] GWC fails to cache tiles if GeoFence with source IP drive…
…n rules are used for authentication (#3126)
- Loading branch information
Showing
4 changed files
with
119 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/gwc/src/test/java/org/geoserver/gwc/HttpRequestRecorderCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* (c) 2018 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, available at the root | ||
* application directory. | ||
*/ | ||
package org.geoserver.gwc; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import javax.servlet.http.HttpServletRequest; | ||
import org.geoserver.ows.AbstractDispatcherCallback; | ||
import org.geoserver.ows.Request; | ||
|
||
/** Integration tests support class that keeps track of the requests send to the dispatcher. */ | ||
public final class HttpRequestRecorderCallback extends AbstractDispatcherCallback { | ||
|
||
static List<HttpServletRequest> requests = new ArrayList<>(); | ||
|
||
public static void reset() { | ||
synchronized (requests) { | ||
requests.clear(); | ||
} | ||
} | ||
|
||
public static ArrayList<HttpServletRequest> getRequests() { | ||
synchronized (requests) { | ||
return new ArrayList<>(requests); | ||
} | ||
} | ||
|
||
@Override | ||
public Request init(Request request) { | ||
synchronized (requests) { | ||
requests.add(request.getHttpRequest()); | ||
} | ||
return super.init(request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters