Changeset 1124
- Timestamp:
- 02/15/11 14:06:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OAIProvider/trunk/src/main/java/eu/clarin/cmdi/oai/provider/impl/VerbContextImpl.java
r1123 r1124 2 2 3 3 import java.io.OutputStream; 4 import java.io.UnsupportedEncodingException;5 import java.net.URLDecoder;6 4 import java.util.ArrayList; 7 5 import java.util.Collections; … … 34 32 private static final int ENCODING_DEFLATE = 0x02; 35 33 private static final int ENCODING_GZIP = 0x03; 36 private static final String DEFAULT_URL_ENCODING = "UTF-8";37 34 private static final String HEADER_ACCEPT_ENCODING = "Accept-Encoding"; 38 35 private static final String HEADER_CONTENT_ENCODING = "Content-Encoding"; … … 78 75 79 76 public String getParameter(String name) { 80 try { 81 String value = request.getParameter(name); 82 if (value != null) { 83 value = value.trim(); 84 if (!value.isEmpty()) { 85 return URLDecoder.decode(value, DEFAULT_URL_ENCODING); 86 } 87 } 88 return null; 89 } catch (UnsupportedEncodingException e) { 90 throw new InternalError("unsupported encoding"); 91 } 77 String value = request.getParameter(name); 78 if (value != null) { 79 value = value.trim(); 80 if (!value.isEmpty()) { 81 return value; 82 } 83 } 84 return null; 92 85 } 93 86
Note: See TracChangeset
for help on using the changeset viewer.