@@ -155,7 +155,7 @@ static public String sign_url(String url, String secret, int seclevel, String as
155155 }
156156 public_secparams .add ("cc=" + implode ("," , countries ).toLowerCase ());
157157 }
158- if ((seclevel & CloudKey .SECLEVEL_REFERER ) > 0 )
158+ if ((seclevel & CloudKey .SECLEVEL_REFERER ) > 0 || ( seclevel & CloudKey . SECLEVEL_REFERER_STRICT ) > 0 )
159159 {
160160 if (referers == null || referers .length == 0 )
161161 {
@@ -179,7 +179,7 @@ static public String sign_url(String url, String secret, int seclevel, String as
179179 }
180180 }
181181 String public_secparams_encoded = "" ;
182-
182+
183183 if (public_secparams .size () > 0 )
184184 {
185185 try
@@ -245,7 +245,7 @@ public static String md5(String password)
245245 {
246246 throw new Error ("No MD5 support in this VM." );
247247 }
248-
248+
249249 StringBuilder hashString = new StringBuilder ();
250250 for (int i =0 ; i <hash .length ; i ++)
251251 {
@@ -258,7 +258,7 @@ public static String md5(String password)
258258 else
259259 {
260260 hashString .append (hex .substring (hex .length () - 2 ));
261- }
261+ }
262262 }
263263 return hashString .toString ();
264264 }
@@ -268,7 +268,7 @@ private static byte[] gzcompress(String inputString) throws Exception
268268 byte [] input = inputString .getBytes ("UTF-8" );
269269 Deflater compresser = new Deflater ();
270270 compresser .setInput (input );
271- compresser .finish ();
271+ compresser .finish ();
272272 ByteArrayOutputStream bos = new ByteArrayOutputStream (input .length );
273273 byte [] buf = new byte [1024 ];
274274 while (!compresser .finished ())
@@ -277,7 +277,7 @@ private static byte[] gzcompress(String inputString) throws Exception
277277 bos .write (buf , 0 , count );
278278 }
279279 bos .close ();
280-
280+
281281 return bos .toByteArray ();
282282 }
283283}
0 commit comments