Commit 91ff53bea19996edcc6e047d552374d08e548353

Authored by xqs
2 parents 3e1906dd 34166686

Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms2 into develop

src/main/java/com/huaheng/framework/aspectj/ApiLogAspect.java
@@ -173,11 +173,16 @@ public class ApiLogAspect @@ -173,11 +173,16 @@ public class ApiLogAspect
173 while(it.hasNext()){ 173 while(it.hasNext()){
174 String name = it.next(); 174 String name = it.next();
175 String header = connection.getHeaderField(name); 175 String header = connection.getHeaderField(name);
176 - headerList.add(name + ": " + header); 176 + if(name == null || "".equals(name))
  177 + //第一行没有name
  178 + //HTTP/1.1 200 OK
  179 + headerList.add(header);
  180 + else
  181 + headerList.add(name + ": " + header);
177 } 182 }
178 log.setResponseHeader(org.apache.commons.lang3.StringUtils.join(headerList, "\n")); 183 log.setResponseHeader(org.apache.commons.lang3.StringUtils.join(headerList, "\n"));
179 AjaxResult json = JSON.parseObject(body, AjaxResult.class); 184 AjaxResult json = JSON.parseObject(body, AjaxResult.class);
180 - log.setHttpCode(String.valueOf(json.getCode())); 185 + log.setRetCode(String.valueOf(json.getCode()));
181 }catch (Exception e){ 186 }catch (Exception e){
182 e.printStackTrace(); 187 e.printStackTrace();
183 }finally { 188 }finally {