|
From: Patrick Y. <kc...@us...> - 2005-08-29 04:04:30
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20700/src/hk/hku/cecid/phoenix/message/handler Modified Files: Request.java Log Message: change to case-insensitive processing of HTTP header in some cases... just to make it work with Sun Java System Application Server 8.1 EE. Index: Request.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Request.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** Request.java 26 Nov 2004 06:54:54 -0000 1.80 --- Request.java 29 Aug 2005 04:04:22 -0000 1.81 *************** *** 1669,1673 **** "Cannot register application to MSH"); String regResult = (String) result.get ! (Constants.QUERY_RESULT_REGISTRATION); return regResult.equals("1"); --- 1669,1673 ---- "Cannot register application to MSH"); String regResult = (String) result.get ! (Constants.QUERY_RESULT_REGISTRATION.toUpperCase()); return regResult.equals("1"); *************** *** 1697,1701 **** int i = 1; while ((headerName = connection.getHeaderFieldKey(i)) != null) { ! if (headerName.startsWith(Constants.QUERY_RESULT_PREFIX)) { headerValue = connection.getHeaderField(i); result.put(headerName, headerValue); --- 1697,1702 ---- int i = 1; while ((headerName = connection.getHeaderFieldKey(i)) != null) { ! headerName = headerName.toUpperCase(); ! if (headerName.startsWith(Constants.QUERY_RESULT_PREFIX.toUpperCase())) { headerValue = connection.getHeaderField(i); result.put(headerName, headerValue); *************** *** 2026,2030 **** final HttpURLConnection connection = sendCommand(command); Map result = expectMapResponse(connection, "Cannot get MSH Status"); ! String s = (String) result.get(Constants.QUERY_RESULT_MSH_STATUS); if (s == null) { throw new RequestException( --- 2027,2032 ---- final HttpURLConnection connection = sendCommand(command); Map result = expectMapResponse(connection, "Cannot get MSH Status"); ! String s = (String) ! result.get(Constants.QUERY_RESULT_MSH_STATUS.toUpperCase()); if (s == null) { throw new RequestException( *************** *** 2097,2101 **** Map result = expectMapResponse(connection, "Cannot get sequence number from MSH"); ! String seq = (String) result.get(Constants.QUERY_RESULT_SEQUENCE_NUMBER); try { int seqInt = Integer.parseInt(seq); --- 2099,2104 ---- Map result = expectMapResponse(connection, "Cannot get sequence number from MSH"); ! String seq = (String) ! result.get(Constants.QUERY_RESULT_SEQUENCE_NUMBER.toUpperCase()); try { int seqInt = Integer.parseInt(seq); *************** *** 2139,2143 **** "Cannot get trusted repository location"); ! String repository = (String) result.get(Constants.QUERY_RESULT_REPOSITORY); StringTokenizer tk = new StringTokenizer(repository, ";"); String[] resultList = new String[tk.countTokens()]; --- 2142,2147 ---- "Cannot get trusted repository location"); ! String repository = (String) ! result.get(Constants.QUERY_RESULT_REPOSITORY.toUpperCase()); StringTokenizer tk = new StringTokenizer(repository, ";"); String[] resultList = new String[tk.countTokens()]; *************** *** 2436,2440 **** int i = 1; while ((headerName = connection.getHeaderFieldKey(i)) != null) { ! if (headerName.startsWith(Constants.QUERY_RESULT_PREFIX)) { headerValue = connection.getHeaderField(i); result.put(headerName, headerValue); --- 2440,2445 ---- int i = 1; while ((headerName = connection.getHeaderFieldKey(i)) != null) { ! headerName = headerName.toUpperCase(); ! if (headerName.startsWith(Constants.QUERY_RESULT_PREFIX.toUpperCase())) { headerValue = connection.getHeaderField(i); result.put(headerName, headerValue); |