Skip to content
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

Document that auto-configuration classes and properties are considered internal #16704

Closed
philwebb opened this issue May 2, 2019 · 2 comments
Labels
type: documentation A documentation update
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented May 2, 2019

No description provided.

@philwebb philwebb added this to the 2.2.x milestone May 2, 2019
@philwebb philwebb added the type: documentation A documentation update label May 2, 2019
@philwebb philwebb modified the milestones: 2.2.x, 2.1.x May 24, 2019
@mbhave mbhave closed this as completed in 47a9bb1 Aug 8, 2019
@mbhave mbhave modified the milestones: 2.1.x, 2.1.8 Aug 8, 2019
@snicoll
Copy link
Member

snicoll commented Aug 12, 2019

@mbhave I wonder if that shouldn't be a bit more high level (in some dedicated section) that explains that extending from auto-configuration should be avoided, etc. I didn't understand why this was documented in the configuration properties section either.

@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Aug 12, 2019
@wilkinsona
Copy link
Member

We looked at this today, and concluded that what we currently have is fine. We consider not sub-classing to be a specific example of not relying anything other than the class's name which is already covered in the additions that have already been made.

@wilkinsona wilkinsona removed the for: team-attention An issue we'd like other members of the team to review label Aug 16, 2019
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
According to the Javadoc for ServletRequest's getServerName() method,
when the `Host` header is set, the server name is "the value of the
part before ':' in the Host header value ...". For a value representing
an IPV6 address such as `[::ffff:abcd:abcd]`, the enclosing square
brackets should therefore not be stripped from the enclosed IPV6
address.

However, the changes made in conjunction with spring-projectsgh-16704 introduced a
regression in Spring Framework 4.1 for the getServerName() method in
MockHttpServletRequest by stripping the enclosing brackets from the
IPV6 address in the `Host` header. Similarly, the changes made in
conjunction with spring-projectsgh-20686 introduced a regression in Spring Framework
4.3.13 and 5.0.2 in the getRequestURL() method in
MockHttpServletRequest by delegating to the getServerName() method
which strips the enclosing brackets.

This commit fixes the implementation of getServerName() so that the
enclosing brackets are no longer stripped from an IPV6 address in the
`Host` header. The implementation of getRequestURL() is therefore also
fixed.

In addition, in order to avoid a NullPointerException, the
implementations of getServerName() and getServerPort() now assert that
an IPV6 address present in the `Host` header correctly contains an
opening and closing bracket and throw an IllegalStateException if that
is not the case.

Closes spring-projectsgh-24916
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
According to the Javadoc for ServletRequest's getServerName() method,
when the `Host` header is set, the server name is "the value of the
part before ':' in the Host header value ...". For a value representing
an IPV6 address such as `[::ffff:abcd:abcd]`, the enclosing square
brackets should therefore not be stripped from the enclosed IPV6
address.

However, the changes made in conjunction with spring-projectsgh-16704 introduced a
regression in Spring Framework 4.1 for the getServerName() method in
MockHttpServletRequest by stripping the enclosing brackets from the
IPV6 address in the `Host` header. Similarly, the changes made in
conjunction with spring-projectsgh-20686 introduced a regression in Spring Framework
4.3.13 and 5.0.2 in the getRequestURL() method in
MockHttpServletRequest by delegating to the getServerName() method
which strips the enclosing brackets.

This commit fixes the implementation of getServerName() so that the
enclosing brackets are no longer stripped from an IPV6 address in the
`Host` header. The implementation of getRequestURL() is therefore also
fixed.

In addition, in order to avoid a NullPointerException, the
implementations of getServerName() and getServerPort() now assert that
an IPV6 address present in the `Host` header correctly contains an
opening and closing bracket and throw an IllegalStateException if that
is not the case.

Closes spring-projectsgh-24916
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
According to the Javadoc for ServletRequest's getServerName() method,
when the `Host` header is set, the server name is "the value of the
part before ':' in the Host header value ...". For a value representing
an IPV6 address such as `[::ffff:abcd:abcd]`, the enclosing square
brackets should therefore not be stripped from the enclosed IPV6
address.

However, the changes made in conjunction with spring-projectsgh-16704 introduced a
regression in Spring Framework 4.1 for the getServerName() method in
MockHttpServletRequest by stripping the enclosing brackets from the
IPV6 address in the `Host` header. Similarly, the changes made in
conjunction with spring-projectsgh-20686 introduced a regression in Spring Framework
4.3.13 and 5.0.2 in the getRequestURL() method in
MockHttpServletRequest by delegating to the getServerName() method
which strips the enclosing brackets.

This commit fixes the implementation of getServerName() so that the
enclosing brackets are no longer stripped from an IPV6 address in the
`Host` header. The implementation of getRequestURL() is therefore also
fixed.

In addition, in order to avoid a NullPointerException, the
implementations of getServerName() and getServerPort() now assert that
an IPV6 address present in the `Host` header correctly contains an
opening and closing bracket and throw an IllegalStateException if that
is not the case.

Closes spring-projectsgh-24916
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

4 participants