Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Mute stupid deprecation message. #4

Merged
merged 1 commit into from

2 participants

@cstamas
Owner

No description provided.

@nabcos

+1

@cstamas cstamas merged commit 78e10cc into master
@davidzchen davidzchen referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@davidzchen davidzchen referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 23, 2012
  1. @cstamas
This page is out of date. Refresh to see the latest.
View
79 ...5346-sonatype/modules/com.noelios.restlet/src/com/noelios/restlet/http/HttpConverter.java
@@ -138,45 +138,46 @@ public void addAdditionalHeaders(Series<Parameter> existingHeaders,
"Addition of the standard header \""
+ param.getName()
+ "\" is not allowed. Please use the Restlet API instead.");
- } else if (param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_AGE)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_CACHE_CONTROL)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_EXPECT)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_FROM)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_IF_RANGE)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_MAX_FORWARDS)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_PRAGMA)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_PROXY_AUTHENTICATE)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_PROXY_AUTHORIZATION)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_RETRY_AFTER)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_TRAILER)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_TRANSFER_ENCODING)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_TRANSFER_EXTENSION)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_UPGRADE)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_VIA)
- || param.getName().equalsIgnoreCase(
- HttpConstants.HEADER_WARNING)) {
- // Standard headers can't shouldn't be overriden
- getLogger()
- .info(
- "Addition of the standard header \""
- + param.getName()
- + "\" is discouraged. Future versions of the Restlet API will directly support it.");
- existingHeaders.add(param);
+// DO NOT NAG if you don't have support for this!
+// } else if (param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_AGE)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_CACHE_CONTROL)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_EXPECT)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_FROM)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_IF_RANGE)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_MAX_FORWARDS)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_PRAGMA)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_PROXY_AUTHENTICATE)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_PROXY_AUTHORIZATION)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_RETRY_AFTER)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_TRAILER)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_TRANSFER_ENCODING)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_TRANSFER_EXTENSION)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_UPGRADE)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_VIA)
+// || param.getName().equalsIgnoreCase(
+// HttpConstants.HEADER_WARNING)) {
+// // Standard headers can't shouldn't be overriden
+// getLogger()
+// .info(
+// "Addition of the standard header \""
+// + param.getName()
+// + "\" is discouraged. Future versions of the Restlet API will directly support it.");
+// existingHeaders.add(param);
} else {
existingHeaders.add(param);
}
Something went wrong with that request. Please try again.