티스토리 뷰

 

 

클라이언트에서 파라미터 값을 URLEncode하여 보내준다면 가장 좋겠지만,

클라이언트를 수정할 수 없는 경우에는 서버쪽에서 수정해야합니다.

 

톰캣 7 특정버전 이상부터 파라미터 값에 특수문자를 받을 수 없도록 수정되었고,

권장하진 않지만 필요하다면 relaxedQueryChars 옵션을 주어 받을 수 있도록 설정 할 수 있습니다.

 

이런 옵션을 사용하고 싶진 않을 경우엔 하위 버전으로 다운그레이드를 하면 됩니다.

 

relaxedQueryChars

The HTTP/1.1 specification requires that certain characters are %nn encoded when used in URI query strings. Unfortunately, many user agents including all the major browsers are not compliant with this specification and use these characters in unencoded form. To prevent Tomcat rejecting such requests, this attribute may be used to specify the additional characters to allow. If not specified, no additional characters will be allowed. The value may be any combination of the following characters: " < > [ \ ] ^ ` { | } . Any other characters present in the value will be ignored.

 

 

relaxedQueryChars에 허용하고자 하는 특수문자 입력

 

설정 예시>

    <Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8"
               relaxedQueryChars="^{}[]|&quot;&lt;&gt;" />

 

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함