Commit 61d83fca336a9439ea8cbcb4a412512654906d6a
Merge remote-tracking branch 'origin/develop' into develop
Showing
1 changed file
with
7 additions
and
2 deletions
src/main/java/com/huaheng/framework/aspectj/ApiLogAspect.java
... | ... | @@ -173,11 +173,16 @@ public class ApiLogAspect |
173 | 173 | while(it.hasNext()){ |
174 | 174 | String name = it.next(); |
175 | 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 | 183 | log.setResponseHeader(org.apache.commons.lang3.StringUtils.join(headerList, "\n")); |
179 | 184 | AjaxResult json = JSON.parseObject(body, AjaxResult.class); |
180 | - log.setHttpCode(String.valueOf(json.getCode())); | |
185 | + log.setRetCode(String.valueOf(json.getCode())); | |
181 | 186 | }catch (Exception e){ |
182 | 187 | e.printStackTrace(); |
183 | 188 | }finally { |
... | ... |