Showing
1 changed file
with
7 additions
and
0 deletions
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | package com.yoho.unions.server.restapi; | 4 | package com.yoho.unions.server.restapi; |
5 | 5 | ||
6 | import java.io.IOException; | 6 | import java.io.IOException; |
7 | +import java.util.Enumeration; | ||
7 | 8 | ||
8 | import javax.annotation.Resource; | 9 | import javax.annotation.Resource; |
9 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
@@ -63,8 +64,14 @@ public class ClickUnionRest { | @@ -63,8 +64,14 @@ public class ClickUnionRest { | ||
63 | public void addUnion4Special(ClickUnionRequestBO bo, HttpServletRequest request, HttpServletResponse response) { | 64 | public void addUnion4Special(ClickUnionRequestBO bo, HttpServletRequest request, HttpServletResponse response) { |
64 | try { | 65 | try { |
65 | bo.setClientIp(RemoteIPInterceptor.getRemoteIP()); | 66 | bo.setClientIp(RemoteIPInterceptor.getRemoteIP()); |
67 | + Enumeration<String> e = request.getHeaderNames(); | ||
68 | + while (e.hasMoreElements()) { | ||
69 | + String key = e.nextElement(); | ||
70 | + System.out.println(key + "=" + request.getHeader(key)); | ||
71 | + } | ||
66 | unionService.clickUnion(bo); | 72 | unionService.clickUnion(bo); |
67 | log.info("addUnion4Special with result is {}, and request is {}", response, request); | 73 | log.info("addUnion4Special with result is {}, and request is {}", response, request); |
74 | + response.setStatus(301); | ||
68 | response.sendRedirect("https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8"); | 75 | response.sendRedirect("https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8"); |
69 | } catch (IOException e) { | 76 | } catch (IOException e) { |
70 | log.error("addUnion4Special error with request={}", bo, e); | 77 | log.error("addUnion4Special error with request={}", bo, e); |
-
Please register or login to post a comment