Skip to content

Remove undocumented feature for overriding the http method via header and related cleanup#3040

Merged
lmsurpre merged 1 commit into
mainfrom
lee-main-3
Nov 29, 2021
Merged

Remove undocumented feature for overriding the http method via header and related cleanup#3040
lmsurpre merged 1 commit into
mainfrom
lee-main-3

Conversation

@lmsurpre
Copy link
Copy Markdown
Member

  1. We had an undocumented / untested feature where you can override the
    HTTP method via a header. This changeset removes that. CXF has a
    slightly different header for doing exactly the same thing. Not sure
    about RESTEasy.

  2. We had a whole lot of unnecessary override methods in
    FHIRHttpServletRequestWrapper. Since the parent class defaults to
    calling the delegate already, its cleaner to leave those out of this
    subclass.

  3. Committing minor edits to the JAX-RS Search resource...it doesn't
    actually consume APPLICATION_FHIR media types in any of the methods and
    there's no need to override the class-level path with the same value

Signed-off-by: Lee Surprenant lmsurpre@us.ibm.com

public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException {
delegate.setCharacterEncoding(arg0);
@SuppressWarnings("unused")
private String displayHeaderValues(Enumeration<String> headers) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was there before, i just added the javadoc for it. i think we could probably axe this one as well.

Copy link
Copy Markdown
Contributor

@prb112 prb112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - good cleanup

private String updateAcceptHeader(String s) {
if (s!= null && !s.contains(CHARSET)) {
String originalHeaderValue = delegate.getHeader(ACCEPT);
String originalHeaderValue = delegate.getHeader(HttpHeaders.ACCEPT);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String originalHeaderValue = delegate.getHeader(HttpHeaders.ACCEPT);
String originalHeaderValue = delegate.getHeader(ACCEPT);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to clean this up after adding static import

1. We had an undocumented / untested feature where you can override the
HTTP method via a header. This changeset removes that. CXF has a
slightly different header for doing exactly the same thing. Not sure
about RESTEasy.

2. We had a whole lot of unnecessary override methods in
FHIRHttpServletRequestWrapper. Since the parent class defaults to
calling the delegate already, its cleaner to leave those out of this
subclass.

3. Committing minor edits to the JAX-RS Search resource...it doesn't
actually consume APPLICATION_FHIR media types in any of the methods and
there's no need to override the class-level path with the same value

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@lmsurpre lmsurpre changed the title Miscellaneous cleanup Remove undocumented feature for overriding the http method via header and related cleanup Nov 24, 2021
@lmsurpre lmsurpre added the removal this change involves removal of a component, class, method, etc label Nov 24, 2021
@lmsurpre lmsurpre merged commit dae66b8 into main Nov 29, 2021
@lmsurpre lmsurpre deleted the lee-main-3 branch November 29, 2021 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

removal this change involves removal of a component, class, method, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants