@@ -23,6 +23,10 @@ public final class ResponseInfo {
2323 * 七牛日志扩展头
2424 */
2525 public final String xlog ;
26+ /**
27+ * cdn日志扩展头
28+ */
29+ public final String xvia ;
2630 /**
2731 * 错误信息
2832 */
@@ -40,28 +44,29 @@ public final class ResponseInfo {
4044 */
4145 public final String ip ;
4246
43- public ResponseInfo (int statusCode , String reqId , String xlog , String host , String ip , double duration , String error ) {
47+ public ResponseInfo (int statusCode , String reqId , String xlog , String xvia , String host , String ip , double duration , String error ) {
4448 this .statusCode = statusCode ;
4549 this .reqId = reqId ;
4650 this .xlog = xlog ;
51+ this .xvia = xvia ;
4752 this .host = host ;
4853 this .duration = duration ;
4954 this .error = error ;
5055 this .ip = ip ;
5156 }
5257
5358 public static ResponseInfo cancelled () {
54- return new ResponseInfo (Cancelled , "" , "" , "" , "" , 0 , "cancelled by user" );
59+ return new ResponseInfo (Cancelled , "" , "" , "" , "" , "" , 0 , "cancelled by user" );
5560 }
5661
5762 public static ResponseInfo invalidArgument (String message ) {
58- return new ResponseInfo (InvalidArgument , "" , "" , "" , "" , 0 ,
63+ return new ResponseInfo (InvalidArgument , "" ,"" , "" , "" , "" , 0 ,
5964 message );
6065 }
6166
6267
6368 public static ResponseInfo fileError (Exception e ) {
64- return new ResponseInfo (InvalidFile , "" , "" , "" , "" ,
69+ return new ResponseInfo (InvalidFile , "" ,"" , "" , "" , "" ,
6570 0 , e .getMessage ());
6671 }
6772
@@ -90,7 +95,7 @@ public boolean needRetry() {
9095 }
9196
9297 public String toString () {
93- return String .format (Locale .ENGLISH , "{ResponseInfo:%s,status:%d, reqId:%s, xlog:%s, host:%s, ip:%s, duration:%f s, error:%s}" ,
94- super .toString (), statusCode , reqId , xlog , host , ip , duration , error );
98+ return String .format (Locale .ENGLISH , "{ResponseInfo:%s,status:%d, reqId:%s, xlog:%s, xvia:%s, host:%s, ip:%s, duration:%f s, error:%s}" ,
99+ super .toString (), statusCode , reqId , xlog , xvia , host , ip , duration , error );
95100 }
96101}
0 commit comments