Author: sergeyb
Date: Tue Nov 19 13:36:18 2013
New Revision: 1543426
URL: http://svn.apache.org/r1543426
Log:
Merged revisions 1543424 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1543424 | sergeyb | 2013-11-19 13:27:05 +0000 (Tue, 19 Nov 2013) | 1 line
[CXF-5377] More updates for Logging interceptors to better report the request
URI for non-HTTP transports
........
Modified:
cxf/branches/2.7.x-fixes/ (props changed)
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalTransportFactory.java
Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/trunk:r1543424
Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java?rev=1543426&r1=1543425&r2=1543426&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
(original)
+++
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
Tue Nov 19 13:36:18 2013
@@ -118,6 +118,15 @@ public class LoggingInInterceptor extend
String uri = (String)message.get(Message.REQUEST_URL);
if (uri == null) {
uri = (String)message.get(Message.REQUEST_URI);
+ if (uri != null && uri.startsWith("/")) {
+ String address = (String)message.get(Message.ENDPOINT_ADDRESS);
+ if (address != null && !address.startsWith(uri)) {
+ if (address.endsWith("/") && address.length() > 1) {
+ address = address.substring(0, address.length());
+ }
+ uri = address + uri;
+ }
+ }
}
if (uri != null) {
buffer.getAddress().append(uri);
Modified:
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java?rev=1543426&r1=1543425&r2=1543426&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
(original)
+++
cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
Tue Nov 19 13:36:18 2013
@@ -115,6 +115,13 @@ public class LoggingOutInterceptor exten
String address = (String)message.get(Message.ENDPOINT_ADDRESS);
if (address != null) {
buffer.getAddress().append(address);
+ String uri = (String)message.get(Message.REQUEST_URI);
+ if (uri != null && !address.startsWith(uri)) {
+ if (!address.endsWith("/") && !uri.startsWith("/")) {
+ buffer.getAddress().append("/");
+ }
+ buffer.getAddress().append(uri);
+ }
}
String ct = (String)message.get(Message.CONTENT_TYPE);
if (ct != null) {
Modified:
cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalTransportFactory.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalTransportFactory.java?rev=1543426&r1=1543425&r2=1543426&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalTransportFactory.java
(original)
+++
cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalTransportFactory.java
Tue Nov 19 13:36:18 2013
@@ -95,6 +95,7 @@ public class LocalTransportFactory exten
messageIncludeProperties.add(Message.ACCEPT_CONTENT_TYPE);
messageIncludeProperties.add(Message.RESPONSE_CODE);
messageIncludeProperties.add(Message.REQUEST_URI);
+ messageIncludeProperties.add(Message.ENDPOINT_ADDRESS);
messageIncludeProperties.add(Message.HTTP_REQUEST_METHOD);
bus = b;