Skip to content

ResourceHttpMessageConverter should read the Content-Disposition header (if available) to get the file name [SPR-15191] #19757

Closed

Description

@spring-projects-issues

Mauro Molinari opened SPR-15191 and commented

When reading contents with RestTemplate:

restTemplate.getForObject(url, Resource.class, parts);

the returned Resource does not specify any file name, even if the HTTP response received from the remote server has a proper Content-Disposition header with file name specified.

It would save some work if ResourceHttpMessageConverter read that header and properly enhanced the returned Resource object.


Affects: 4.2.8, 4.3.1

Issue Links:

Referenced from: commits 768802f

Activity

  1. spring-projects-issues commented on Jan 26, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Good idea! Rolling this into 5.0 RC1, based on our new ContentDisposition management in HttpHeaders...

  2. added
    type: enhancement
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: web

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions