Deprecate JSONP and disable it by default in Jackson view
Issue: SPR-16798
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,8 @@ import org.springframework.lang.Nullable;
|
||||
/**
|
||||
* SockJS transport types.
|
||||
*
|
||||
* <p>JSONP support will be removed as of Spring Framework 5.1, use others transports instead.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Sebastien Deleuze
|
||||
* @since 4.0
|
||||
@@ -40,8 +42,10 @@ public enum TransportType {
|
||||
|
||||
XHR_SEND("xhr_send", HttpMethod.POST, "cors", "jsessionid", "no_cache"),
|
||||
|
||||
@Deprecated
|
||||
JSONP("jsonp", HttpMethod.GET, "jsessionid", "no_cache"),
|
||||
|
||||
@Deprecated
|
||||
JSONP_SEND("jsonp_send", HttpMethod.POST, "jsessionid", "no_cache"),
|
||||
|
||||
XHR_STREAMING("xhr_streaming", HttpMethod.POST, "cors", "jsessionid", "no_cache"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -79,6 +79,7 @@ public class DefaultSockJsService extends TransportHandlingSockJsService impleme
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static Set<TransportHandler> getDefaultTransportHandlers(@Nullable Collection<TransportHandler> overrides) {
|
||||
Set<TransportHandler> result = new LinkedHashSet<>(8);
|
||||
result.add(new XhrPollingTransportHandler());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,7 +41,9 @@ import org.springframework.web.util.JavaScriptUtils;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.0
|
||||
* @deprecated Will be removed as of Spring Framework 5.1, use others transports instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public class JsonpPollingTransportHandler extends AbstractHttpSendingTransportHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,7 +38,9 @@ import org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJ
|
||||
* A {@link TransportHandler} that receives messages over HTTP.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @deprecated Will be removed as of Spring Framework 5.1, use others transports instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public class JsonpReceivingTransportHandler extends AbstractHttpReceivingTransportHandler {
|
||||
|
||||
private final FormHttpMessageConverter formConverter = new FormHttpMessageConverter();
|
||||
|
||||
Reference in New Issue
Block a user