Java filter failing to set response headers

前端 未结 4 1848
太阳男子
太阳男子 2021-01-11 15:14

I am trying to create a Java \"Filter\" which detects a custom HTTP Request Header, and inserts response headers so that the file will download automatically. The response

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-11 16:07

    Try this: set an attribute on the request if the request header is present. Then, check for the attribute after the chain.doFilter(...) and set the response headers then.

提交回复
热议问题