-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Code returns hard instance of HttpURLConnection rather than URLConnection #27142
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
Comments
The The |
Indeed this doesn't seem to be Spring Framework related. @jzheaux do you have any suggestions? |
This was an issue with 5.4.5. Upgrading to 5.5 the code changed to use the Resource |
The documentation linked is for the 5.5.x version, the 5.4.x doesn't have that documentation. Looks like a case of reading uptodate documentation but using an older version instead. The support for reading files has been added explicitly in 5.5.x (see spring-projects/spring-security#9028), so apparently it wasn't supported before that. |
@richardcs I agree with @mdeinum's analysis here. If you still feel like this is an issue, please feel free to use Spring Security's issue tracker , and I'd be happy to take a closer look. |
spring-framework/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java
Line 187 in b595dc1
As documented here : https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/saml2/provider/service/registration/RelyingPartyRegistrations.html the code should be able to handle classpath:, file: and http: but since it just uses a RestTemplate.getForObject, which delegates to SimpleClientHttpRequestFactory, there is nothing that will work except a http request. Im not sure where to place this issue, but the offending code error is here and the URLConnection is there for the taking. The actual instance returned for file is "sun.net.www.protocol.file.FileURLConnection" which extends URLConnection (https://github.com/frohoff/jdk8u-jdk/blob/master/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java)
The text was updated successfully, but these errors were encountered: