Skip to content

RestTemplate does not do HTTP GET if it should [SPR-5536] #10207

Closed
@spring-projects-issues

Description

@spring-projects-issues

Eberhard Wolff opened SPR-5536 and commented

If you call getForObject() on an RestTemplate it does not use HTTP GET. The reason is that SimpleClientHttpRequest calls FileCopyUtils.copy(bufferedOutput, this.connection.getOutputStream()); . On Mac OS X JDK 1.6 this connection is sun.net.www.protocol.http.HttpURLConnection and getOutputStream() contains this code:

if(method.equals("GET"))
method = "POST";

making it a POST.


Affects: 3.0 M2

Attachments:

Referenced from: commits b08ad44, cbd5ddb

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions