Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ public final class HttpConstants {
/** The name of the HTTP response code for a Precondition Required error. */
public static final int PRECONDITION_REQUIRED = 428;

/** The name of the HTTP request header indicating a browser's origin. */
public static final String ORIGIN = "Origin";

/** The name of the HTTP request header used to influence what information is included in responses. */
public static final String PREFER = "Prefer";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import static org.trellisldp.common.HttpConstants.ACCEPT_RANGES;
import static org.trellisldp.common.HttpConstants.DESCRIPTION;
import static org.trellisldp.common.HttpConstants.MEMENTO_DATETIME;
import static org.trellisldp.common.HttpConstants.ORIGIN;
import static org.trellisldp.common.HttpConstants.PREFER;
import static org.trellisldp.common.HttpConstants.PREFERENCE_APPLIED;
import static org.trellisldp.common.HttpConstants.RANGE;
Expand Down Expand Up @@ -391,6 +392,7 @@ private CompletionStage<InputStream> getBinaryStream(final IRI dsid, final Trell
private String buildVaryHeader(final boolean isLdpRs) {
final List<String> variants = new ArrayList<>();
variants.add(ACCEPT);
variants.add(ORIGIN);
if (!isMemento) {
variants.add(ACCEPT_DATETIME);
}
Expand Down