public class RedirectRewritingHttpHeaderProcessor extends PreservingHttpHeaderProcessor
HttpHeaderProcessor
that preserves all headers by prepending a prefix,
translates URL in resource location headers and pass-through certain headers.
Headers rewritten:
Location
Content-Location
Content-Base
Content-Type
Content-Disposition
If prefix
property is null
(default), all headers but Content-Length
are copied as they are. With non-null
prefix, all headers, including
Length
are preserved by prepending header name with prefix
.
Caveat: if prefix
is an empty string, all headers including Content-Length
are copied as they are. This is presumably a bug.
Intended for archival-URL and domain-prefix mode.
prefix
HTTP_CONTENT_BASE_HEADER, HTTP_CONTENT_BASE_HEADER_UP, HTTP_CONTENT_DISP_HEADER, HTTP_CONTENT_DISP_HEADER_UP, HTTP_CONTENT_LOCATION_HEADER, HTTP_CONTENT_LOCATION_HEADER_UP, HTTP_CONTENT_RANGE_HEADER, HTTP_CONTENT_RANGE_HEADER_UP, HTTP_CONTENT_TYPE_HEADER, HTTP_CONTENT_TYPE_HEADER_UP, HTTP_LENGTH_HEADER, HTTP_LENGTH_HEADER_UP, HTTP_LOCATION_HEADER, HTTP_LOCATION_HEADER_UP, HTTP_TRANSFER_ENCODING_HEADER, HTTP_TRANSFER_ENCODING_HEADER_UP
Constructor and Description |
---|
RedirectRewritingHttpHeaderProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
filter(Map<String,String> output,
String key,
String value,
ResultURIConverter uriConverter,
CaptureSearchResult result)
optionally add header key:value to output for later returning to client
|
getPrefix, preserve, preserveAlways, setPrefix
public RedirectRewritingHttpHeaderProcessor()
public void filter(Map<String,String> output, String key, String value, ResultURIConverter uriConverter, CaptureSearchResult result)
HttpHeaderProcessor
Copyright © 2005–2017 IIPC. All rights reserved.