에러 HTTP Status 406

코딩/WEB 2014. 11. 17. 11:30

HTTP Status 406 -

type Status report

message

description The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.


파일을 직접 다운받기 위해 Controller의 코드를 손보는 중에 다음과 같은 에러가 나옴.

이유는 RequestMapping에 produces=MediaType.APPLICATION_OCTET_STREAM_VALUE 때문인 듯.


@RequestMapping(value="/down/{path:.+}", produces=MediaType.APPLICATION_OCTET_STREAM_VALUE)


이 부분을 지워주니 다운로드가 잘 됨.

Posted by 타다키치
,