Remove Accept-Charset header

This commit is contained in:
Grahame Grieve 2024-05-25 03:44:20 -05:00
parent de544a752e
commit 5133a88060
9 changed files with 0 additions and 18 deletions

View File

@ -307,7 +307,6 @@ public class ClientUtils {
request.addHeader("Accept", format);
request.addHeader("Content-Type", format + ";charset=" + DEFAULT_CHARSET);
}
request.addHeader("Accept-Charset", DEFAULT_CHARSET);
if (headers != null) {
for (Header header : headers) {
request.addHeader(header);

View File

@ -263,7 +263,6 @@ public class ClientUtils {
request.addHeader("Accept", format);
request.addHeader("Content-Type", format + ";charset=" + DEFAULT_CHARSET);
}
request.addHeader("Accept-Charset", DEFAULT_CHARSET);
if (headers != null) {
for (Header header : headers) {
request.addHeader(header);

View File

@ -84,7 +84,6 @@ public class FhirRequestBuilder {
/**
* Adds necessary headers for all REST requests.
* <li>User-Agent : hapi-fhir-tooling-client</li>
* <li>Accept-Charset : {@link FhirRequestBuilder#DEFAULT_CHARSET}</li>
*
* @param request {@link Request.Builder} to add default headers to.
*/
@ -92,7 +91,6 @@ public class FhirRequestBuilder {
if (headers == null || !headers.names().contains("User-Agent")) {
request.addHeader("User-Agent", "hapi-fhir-tooling-client");
}
request.addHeader("Accept-Charset", DEFAULT_CHARSET);
}
/**

View File

@ -88,7 +88,6 @@ public class FhirRequestBuilder {
/**
* Adds necessary headers for all REST requests.
* <li>User-Agent : hapi-fhir-tooling-client</li>
* <li>Accept-Charset : {@link FhirRequestBuilder#DEFAULT_CHARSET}</li>
*
* @param request {@link Request.Builder} to add default headers to.
*/
@ -96,7 +95,6 @@ public class FhirRequestBuilder {
if (headers == null || !headers.names().contains("User-Agent")) {
request.addHeader("User-Agent", "hapi-fhir-tooling-client");
}
request.addHeader("Accept-Charset", DEFAULT_CHARSET);
}
/**

View File

@ -1558,7 +1558,6 @@
<xs:attribute name="onsubmit" type="Script"/>
<xs:attribute name="onreset" type="Script"/>
<xs:attribute name="accept" type="ContentTypes"/>
<xs:attribute name="accept-charset" type="Charsets"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>

View File

@ -78,7 +78,6 @@ public class FhirRequestBuilder {
/**
* Adds necessary headers for all REST requests.
* <li>User-Agent : hapi-fhir-tooling-client</li>
* <li>Accept-Charset : {@link FhirRequestBuilder#DEFAULT_CHARSET}</li>
*
* @param request {@link Request.Builder} to add default headers to.
*/
@ -86,7 +85,6 @@ public class FhirRequestBuilder {
if (headers == null || !headers.names().contains("User-Agent")) {
request.addHeader("User-Agent", "hapi-fhir-tooling-client");
}
request.addHeader("Accept-Charset", DEFAULT_CHARSET);
}
/**

View File

@ -26,9 +26,6 @@ class FhirRequestBuilderTest {
Assertions.assertEquals("hapi-fhir-tooling-client", headersMap.get("User-Agent").get(0),
"User-Agent header not populated with expected value \"hapi-fhir-tooling-client\".");
Assertions.assertNotNull(headersMap.get("Accept-Charset"), "Accept-Charset header null.");
Assertions.assertEquals(FhirRequestBuilder.DEFAULT_CHARSET, headersMap.get("Accept-Charset").get(0),
"Accept-Charset header not populated with expected value " + FhirRequestBuilder.DEFAULT_CHARSET);
}
@Test

View File

@ -75,7 +75,6 @@ public class FhirRequestBuilder {
/**
* Adds necessary headers for all REST requests.
* <li>User-Agent : hapi-fhir-tooling-client</li>
* <li>Accept-Charset : {@link FhirRequestBuilder#DEFAULT_CHARSET}</li>
*
* @param request {@link Request.Builder} to add default headers to.
*/
@ -83,7 +82,6 @@ public class FhirRequestBuilder {
if (headers == null || !headers.names().contains("User-Agent")) {
request.addHeader("User-Agent", "hapi-fhir-tooling-client");
}
request.addHeader("Accept-Charset", DEFAULT_CHARSET);
}
/**

View File

@ -23,10 +23,6 @@ class FhirRequestBuilderTest {
Assertions.assertNotNull(headersMap.get("User-Agent"), "User-Agent header null.");
Assertions.assertEquals("hapi-fhir-tooling-client", headersMap.get("User-Agent").get(0),
"User-Agent header not populated with expected value \"hapi-fhir-tooling-client\".");
Assertions.assertNotNull(headersMap.get("Accept-Charset"), "Accept-Charset header null.");
Assertions.assertEquals(FhirRequestBuilder.DEFAULT_CHARSET, headersMap.get("Accept-Charset").get(0),
"Accept-Charset header not populated with expected value " + FhirRequestBuilder.DEFAULT_CHARSET);
}
@Test