Skip to content

logfile endpoint returns HTTP 406 on Accept: text/plain #16188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
joshiste opened this issue Mar 11, 2019 · 2 comments
Closed

logfile endpoint returns HTTP 406 on Accept: text/plain #16188

joshiste opened this issue Mar 11, 2019 · 2 comments
Labels
type: bug A general bug
Milestone

Comments

@joshiste
Copy link
Contributor

The logfile endpoint responds with a content of type text/plain.
When doing the get request with Accept: text/plain a HTTP 406 (Not Acceptable) is returned. I'd expected such a request to succeed.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 11, 2019
@joshiste
Copy link
Contributor Author

It looks like that only Accept: */* (or omitting the header) works.

@wilkinsona
Copy link
Member

Thanks for the report, @joshiste. Looks like this affects all three web stacks. Here's an addition to LogFileWebEndpointWebIntegrationTests that fails on Jersey, Spring MVC, and Reactive:

@Test
public void getRequestThatAcceptsTextPlainProducesResponseWithLogFile() {
	TestPropertyValues.of("logging.file:" + this.logFile.getAbsolutePath())
			.applyTo(context);
	client.get().uri("/actuator/logfile").accept(MediaType.TEXT_PLAIN).exchange()
			.expectStatus().isOk().expectBody(String.class).isEqualTo("--TEST--");
}

@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 11, 2019
@wilkinsona wilkinsona added this to the 2.1.x milestone Mar 11, 2019
@wilkinsona wilkinsona modified the milestones: 2.1.x, 2.1.4 Mar 11, 2019
joshiste added a commit to codecentric/spring-boot-admin that referenced this issue Mar 18, 2019
asibross pushed a commit to asibross/spring-boot-admin that referenced this issue Mar 19, 2019
wilkinsona added a commit that referenced this issue Mar 29, 2019
In addition to upgrading to Jetty 9.4.15, this commit updates the
KeyStores used in embedded container testing to add to their entries
subject alternative name extensions for localhost and 127.0.0.1. As
of 9.4.16, Jetty requires the SAN extensions.

Closes gh-16188
adamsbusiness pushed a commit to adamsbusiness/spring-admin that referenced this issue Apr 24, 2021
ejavexpert added a commit to ejavexpert/java-spring-boot-admin that referenced this issue Mar 25, 2022
KingSize0319 added a commit to KingSize0319/spring-boot-admin that referenced this issue Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants