Remove @author tags; fix some SVN properties

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@744689 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-02-15 16:34:53 +00:00
parent 9806e2f5d0
commit 9ca4ef79ee
177 changed files with 728 additions and 1007 deletions

View File

@ -57,7 +57,6 @@ import org.apache.http.util.EntityUtils;
/**
* How to send a request directly using {@link HttpClient HttpClient}.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->

View File

@ -59,7 +59,6 @@ import org.apache.http.util.EntityUtils;
/**
* How to send a request via proxy using {@link HttpClient HttpClient}.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->

View File

@ -53,7 +53,6 @@ import org.apache.http.util.EntityUtils;
/**
* An example that performs GETs from multiple threads.
*
* @author Michael Becke
*/
public class ClientMultiThreadedExecution {

View File

@ -62,7 +62,6 @@ import org.apache.http.protocol.BasicHttpContext;
* The subsequent message exchange in this example should not
* be used as a template.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->

View File

@ -63,7 +63,6 @@ import org.apache.http.protocol.BasicHttpContext;
* The message exchange, both subsequently and for tunnelling,
* should not be used as a template.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->

View File

@ -60,7 +60,6 @@ import org.apache.http.protocol.BasicHttpContext;
* The subsequent message exchange in this example should not
* be used as a template.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->

View File

@ -61,7 +61,6 @@ import org.apache.http.protocol.BasicHttpContext;
* The message exchange, both subsequently and for tunnelling,
* should not be used as a template.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->

View File

@ -34,7 +34,6 @@ package org.apache.http.auth;
/**
* Constants and static helpers related to the HTTP authentication.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -62,8 +62,6 @@ import org.apache.http.HttpRequest;
* challenge-response exchanges
* </p>
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a>
*
* @since 4.0
*/

View File

@ -35,7 +35,6 @@ import org.apache.http.params.HttpParams;
/**
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -42,7 +42,6 @@ import org.apache.http.params.HttpParams;
* Authentication scheme registry that can be used to obtain the corresponding
* authentication scheme implementation for a given type of authorization challenge.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
*
* @version $Revision$

View File

@ -39,8 +39,6 @@ import org.apache.http.util.LangUtils;
* a port number, a realm name and an authentication scheme name which
* {@link Credentials Credentials} apply to.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author <a href="mailto:adrian@intencha.com">Adrian Sutton</a>
*
* @since 4.0
*/

View File

@ -35,7 +35,6 @@ package org.apache.http.auth;
* This class provides detailed information about the state of the
* authentication process.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -35,7 +35,6 @@ import org.apache.http.ProtocolException;
/**
* Signals a failure in authentication process
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -37,7 +37,6 @@ import org.apache.http.util.LangUtils;
/**
* Basic user principal used for HTTP authentication
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -35,8 +35,6 @@ import java.security.Principal;
/**
* User name and password based authentication credentials.
*
* @author Unascribed
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
*
* @version $Revision$ $Date$
*/

View File

@ -34,7 +34,6 @@ package org.apache.http.auth;
* Authentication credentials required to respond to a authentication
* challenge are invalid
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -36,7 +36,6 @@ import org.apache.http.ProtocolException;
* Signals that authentication challenge is in some way invalid or
* illegal in the given context
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -37,9 +37,6 @@ import org.apache.http.util.LangUtils;
/** {@link Credentials} specific to the Windows platform.
*
* @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a>
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 2.0
*/

View File

@ -37,7 +37,6 @@ import org.apache.http.util.LangUtils;
/** NT (MS Windows specific) user principal used for HTTP authentication
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -37,10 +37,6 @@ import org.apache.http.util.LangUtils;
/**
* Username and password {@link Credentials}
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
* @author Sean C. Sullivan
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$ $Date$
*

View File

@ -38,7 +38,6 @@ import org.apache.http.protocol.HTTP;
* This class implements an adaptor around the {@link HttpParams} interface
* to simplify manipulation of the HTTP authentication specific parameters.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -41,7 +41,6 @@ import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.protocol.HttpContext;
/**
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public interface AuthenticationHandler {

View File

@ -33,7 +33,6 @@ package org.apache.http.client;
/**
* Signals a circular redirect
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -38,7 +38,6 @@ import org.apache.http.cookie.Cookie;
/**
* Abstract cookie store.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -36,7 +36,6 @@ import org.apache.http.auth.Credentials;
/**
* Abstract credentials provider.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -100,7 +100,6 @@ import org.apache.http.protocol.HttpContext;
* }
* </PRE>
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -44,8 +44,6 @@ import org.apache.http.protocol.HttpContext;
* data as methods of this interfrace may be executed from multiple threads
* </p>
*
* @author Michael Becke
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public interface HttpRequestRetryHandler {

View File

@ -36,7 +36,6 @@ import org.apache.http.ProtocolException;
* Signals failure to retry the request due to non-repeatable request
* entity.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -35,7 +35,6 @@ import org.apache.http.ProtocolException;
/**
* Signals violation of HTTP specification caused by an invalid redirect
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -47,7 +47,6 @@ import org.apache.http.protocol.HttpContext;
* data as methods of this interfrace may be executed from multiple threads
* </p>
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public interface RedirectHandler {

View File

@ -52,7 +52,6 @@ import org.apache.http.protocol.HttpContext;
* connections for reading the response entity. Such connections
* MUST be released, but that is out of the scope of a request director.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -38,7 +38,6 @@ import org.apache.http.HttpResponse;
* Handler that encapsulates the process of generating a response object
* from a {@link HttpResponse}.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -1,7 +1,7 @@
/*
* $HeadURL:$
* $Revision:$
* $Date:$
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
@ -43,7 +43,6 @@ import org.apache.http.protocol.HttpContext;
* The user token will be used to ensure that user specific resouces will not
* shared with or reused by other users.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -44,7 +44,6 @@ import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
* Interface representing an HTTP request that can be aborted by shutting
* down the underlying HTTP connection.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* <!-- empty lines to avoid svn diff problems -->
* @version $Revision$

View File

@ -40,7 +40,6 @@ import org.apache.http.protocol.HTTP;
/**
* Basic implementation of an HTTP request that can be modified.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -50,7 +50,6 @@ import org.apache.http.params.HttpProtocolParams;
/**
* Basic implementation of an HTTP request that can be modified.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -40,7 +40,6 @@ import org.apache.http.HttpRequest;
* convenience methods to access request properties such as request URI
* and method type.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* <!-- empty lines to avoid svn diff problems -->
* @version $Revision$

View File

@ -35,7 +35,6 @@ import org.apache.http.params.HttpParams;
/**
* An adaptor for accessing HTTP client parameters in {@link HttpParams}.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -62,7 +62,6 @@ import org.apache.http.protocol.ExecutionContext;
* {@link CookieStore} to the request being executed and generates
* corresponding cookierequest headers.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -44,7 +44,6 @@ import org.apache.http.protocol.HttpContext;
/**
* Request interceptor that adds default request headers.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -46,7 +46,6 @@ import org.apache.http.auth.Credentials;
import org.apache.http.protocol.HttpContext;
/**
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -46,7 +46,6 @@ import org.apache.http.auth.Credentials;
import org.apache.http.protocol.HttpContext;
/**
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -53,7 +53,6 @@ import org.apache.http.protocol.HttpContext;
* Response interceptor that populates the current {@link CookieStore} with data
* contained in response cookies received in the given the HTTP response.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -1,44 +1,44 @@
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
/**
* Abstraction of international domain name (IDN) conversion.
*/
public interface Idn {
/**
* Converts a name from its punycode representation to Unicode.
* The name may be a single hostname or a dot-separated qualified domain name.
* @param punycode the Punycode representation
* @return the Unicode domain name
*/
String toUnicode(String punycode);
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
/**
* Abstraction of international domain name (IDN) conversion.
*/
public interface Idn {
/**
* Converts a name from its punycode representation to Unicode.
* The name may be a single hostname or a dot-separated qualified domain name.
* @param punycode the Punycode representation
* @return the Unicode domain name
*/
String toUnicode(String punycode);
}

View File

@ -1,70 +1,70 @@
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* Uses the java.net.IDN class through reflection.
*/
public class JdkIdn implements Idn {
private Method toUnicode;
/**
*
* @throws ClassNotFoundException if java.net.IDN is not available
*/
public JdkIdn() throws ClassNotFoundException {
Class<?> clazz = Class.forName("java.net.IDN");
try {
toUnicode = clazz.getMethod("toUnicode", String.class);
} catch (SecurityException e) {
// doesn't happen
throw new IllegalStateException(e.getMessage(), e);
} catch (NoSuchMethodException e) {
// doesn't happen
throw new IllegalStateException(e.getMessage(), e);
}
}
public String toUnicode(String punycode) {
try {
return (String) toUnicode.invoke(null, punycode);
} catch (IllegalAccessException e) {
throw new IllegalStateException(e.getMessage(), e);
} catch (InvocationTargetException e) {
Throwable t = e.getCause();
throw new RuntimeException(t.getMessage(), t);
}
}
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* Uses the java.net.IDN class through reflection.
*/
public class JdkIdn implements Idn {
private Method toUnicode;
/**
*
* @throws ClassNotFoundException if java.net.IDN is not available
*/
public JdkIdn() throws ClassNotFoundException {
Class<?> clazz = Class.forName("java.net.IDN");
try {
toUnicode = clazz.getMethod("toUnicode", String.class);
} catch (SecurityException e) {
// doesn't happen
throw new IllegalStateException(e.getMessage(), e);
} catch (NoSuchMethodException e) {
// doesn't happen
throw new IllegalStateException(e.getMessage(), e);
}
}
public String toUnicode(String punycode) {
try {
return (String) toUnicode.invoke(null, punycode);
} catch (IllegalAccessException e) {
throw new IllegalStateException(e.getMessage(), e);
} catch (InvocationTargetException e) {
Throwable t = e.getCause();
throw new RuntimeException(t.getMessage(), t);
}
}
}

View File

@ -1,54 +1,54 @@
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
/**
* Facade that provides conversion between Unicode and Punycode domain names.
* It will use an appropriate implementation.
*/
public class Punycode {
private static Idn impl;
static {
init();
}
public static String toUnicode(String punycode) {
return impl.toUnicode(punycode);
}
private static void init() {
try {
impl = new JdkIdn();
} catch (Exception e) {
impl = new Rfc3492Idn();
}
}
}
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
/**
* Facade that provides conversion between Unicode and Punycode domain names.
* It will use an appropriate implementation.
*/
public class Punycode {
private static Idn impl;
static {
init();
}
public static String toUnicode(String punycode) {
return impl.toUnicode(punycode);
}
private static void init() {
try {
impl = new JdkIdn();
} catch (Exception e) {
impl = new Rfc3492Idn();
}
}
}

View File

@ -1,121 +1,121 @@
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
import java.util.StringTokenizer;
/**
* Implementation from pseudo code in RFC 3492.
*/
public class Rfc3492Idn implements Idn {
private static final int base = 36;
private static final int tmin = 1;
private static final int tmax = 26;
private static final int skew = 38;
private static final int damp = 700;
private static final int initial_bias = 72;
private static final int initial_n = 128;
private static final char delimiter = '-';
private static final String ACE_PREFIX = "xn--";
private int adapt(int delta, int numpoints, boolean firsttime) {
if (firsttime) delta = delta / damp;
else delta = delta / 2;
delta = delta + (delta / numpoints);
int k = 0;
while (delta > ((base - tmin) * tmax) / 2) {
delta = delta / (base - tmin);
k = k + base;
}
return k + (((base - tmin + 1) * delta) / (delta + skew));
}
private int digit(char c) {
if ((c >= 'A') && (c <= 'Z')) return (c - 'A');
if ((c >= 'a') && (c <= 'z')) return (c - 'a');
if ((c >= '0') && (c <= '9')) return (c - '0') + 26;
throw new IllegalArgumentException("illegal digit: "+ c);
}
public String toUnicode(String punycode) {
StringBuffer unicode = new StringBuffer(punycode.length());
StringTokenizer tok = new StringTokenizer(punycode, ".");
while (tok.hasMoreTokens()) {
String t = tok.nextToken();
if (unicode.length() > 0) unicode.append('.');
if (t.startsWith(ACE_PREFIX)) t = decode(t.substring(4));
unicode.append(t);
}
return unicode.toString();
}
protected String decode(String input) {
int n = initial_n;
int i = 0;
int bias = initial_bias;
StringBuffer output = new StringBuffer(input.length());
int lastdelim = input.lastIndexOf(delimiter);
if (lastdelim != -1) {
output.append(input.subSequence(0, lastdelim));
input = input.substring(lastdelim + 1);
}
while (input.length() > 0) {
int oldi = i;
int w = 1;
for (int k = base;; k += base) {
if (input.length() == 0) break;
char c = input.charAt(0);
input = input.substring(1);
int digit = digit(c);
i = i + digit * w; // FIXME fail on overflow
int t;
if (k <= bias + tmin) {
t = tmin;
} else if (k >= bias + tmax) {
t = tmax;
} else {
t = k - bias;
}
if (digit < t) break;
w = w * (base - t); // FIXME fail on overflow
}
bias = adapt(i - oldi, output.length() + 1, (oldi == 0));
n = n + i / (output.length() + 1); // FIXME fail on overflow
i = i % (output.length() + 1);
// {if n is a basic code point then fail}
output.insert(i, (char) n);
i++;
}
return output.toString();
}
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.utils;
import java.util.StringTokenizer;
/**
* Implementation from pseudo code in RFC 3492.
*/
public class Rfc3492Idn implements Idn {
private static final int base = 36;
private static final int tmin = 1;
private static final int tmax = 26;
private static final int skew = 38;
private static final int damp = 700;
private static final int initial_bias = 72;
private static final int initial_n = 128;
private static final char delimiter = '-';
private static final String ACE_PREFIX = "xn--";
private int adapt(int delta, int numpoints, boolean firsttime) {
if (firsttime) delta = delta / damp;
else delta = delta / 2;
delta = delta + (delta / numpoints);
int k = 0;
while (delta > ((base - tmin) * tmax) / 2) {
delta = delta / (base - tmin);
k = k + base;
}
return k + (((base - tmin + 1) * delta) / (delta + skew));
}
private int digit(char c) {
if ((c >= 'A') && (c <= 'Z')) return (c - 'A');
if ((c >= 'a') && (c <= 'z')) return (c - 'a');
if ((c >= '0') && (c <= '9')) return (c - '0') + 26;
throw new IllegalArgumentException("illegal digit: "+ c);
}
public String toUnicode(String punycode) {
StringBuffer unicode = new StringBuffer(punycode.length());
StringTokenizer tok = new StringTokenizer(punycode, ".");
while (tok.hasMoreTokens()) {
String t = tok.nextToken();
if (unicode.length() > 0) unicode.append('.');
if (t.startsWith(ACE_PREFIX)) t = decode(t.substring(4));
unicode.append(t);
}
return unicode.toString();
}
protected String decode(String input) {
int n = initial_n;
int i = 0;
int bias = initial_bias;
StringBuffer output = new StringBuffer(input.length());
int lastdelim = input.lastIndexOf(delimiter);
if (lastdelim != -1) {
output.append(input.subSequence(0, lastdelim));
input = input.substring(lastdelim + 1);
}
while (input.length() > 0) {
int oldi = i;
int w = 1;
for (int k = base;; k += base) {
if (input.length() == 0) break;
char c = input.charAt(0);
input = input.substring(1);
int digit = digit(c);
i = i + digit * w; // FIXME fail on overflow
int t;
if (k <= bias + tmin) {
t = tmin;
} else if (k >= bias + tmax) {
t = tmax;
} else {
t = k - bias;
}
if (digit < t) break;
w = w * (base - t); // FIXME fail on overflow
}
bias = adapt(i - oldi, output.length() + 1, (oldi == 0));
n = n + i / (output.length() + 1); // FIXME fail on overflow
i = i % (output.length() + 1);
// {if n is a basic code point then fail}
output.insert(i, (char) n);
i++;
}
return output.toString();
}
}

View File

@ -38,7 +38,6 @@ import java.io.IOException;
* Basic implementation of {@link EofSensorWatcher EofSensorWatcher}.
* The underlying connection is released on close or EOF.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -44,7 +44,6 @@ import org.apache.http.entity.HttpEntityWrapper;
* typically <i>not</i> return a managed entity, but you can replace
* the unmanaged entity in the response with a managed one.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -40,10 +40,6 @@ import org.apache.http.conn.scheme.SchemeRegistry;
/**
* Management interface for {@link ManagedClientConnection client connections}.
*
* @author Michael Becke
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -37,7 +37,6 @@ import org.apache.http.params.HttpParams;
/**
* A factory for creating new {@link ClientConnectionManager} instances.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -52,7 +52,6 @@ import org.apache.http.protocol.HttpContext;
* sockets. Creating a tunnelled connection through a proxy, however,
* is not within the scope of the operator.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -37,7 +37,6 @@ import java.io.InterruptedIOException;
* A timeout while connecting to an HTTP server or waiting for an
* available connection from an HttpConnectionManager.
*
* @author <a href="mailto:laura@lwerner.org">Laura Werner</a>
*
* @since 4.0
*/

View File

@ -38,7 +38,6 @@ import org.apache.http.protocol.HttpContext;
* Interface for deciding how long a connection can remain
* idle before being reused.
*
* @author <a href="mailto:sberlin at gmail.com">Sam Berlin</a>
*
*
* @version $Revision: $

View File

@ -35,7 +35,6 @@ package org.apache.http.conn;
* A timeout while waiting for an available connection
* from a connection manager.
*
* @author <a href="mailto:laura@lwerner.org">Laura Werner</a>
*
* @since 4.0
*/

View File

@ -45,7 +45,6 @@ import java.io.IOException;
* The first invocation releases the connection, subsequent calls
* are ignored.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -49,10 +49,6 @@ import java.io.IOException;
*
* @see EofSensorWatcher EofSensorWatcher
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
* @author Ortwin Glueck
* @author Eric Johnson
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -38,7 +38,6 @@ import java.io.IOException;
* A watcher for {@link EofSensorInputStream EofSensorInputStream}.
* Each stream will notify it's watcher at most once.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -50,7 +50,6 @@ import org.apache.http.conn.routing.HttpRoute;
* A client-side connection with advanced connection logic.
* Instances are typically obtained from a connection manager.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -46,7 +46,6 @@ import org.apache.http.params.HttpParams;
* {@link ClientConnectionOperator operator}.
*
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -38,8 +38,6 @@ import org.apache.http.params.HttpParams;
* to client-side
* {@link org.apache.http.conn.ClientConnectionManager connection managers}.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author Michael Becke
*
* @version $Revision$
*

View File

@ -38,7 +38,6 @@ import org.apache.http.conn.routing.HttpRoute;
* {@link org.apache.http.conn.ClientConnectionManager connection managers} for
* a fine-grained control of connections on a per route basis.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -41,7 +41,6 @@ import org.apache.http.conn.routing.HttpRoute;
* {@link org.apache.http.conn.ClientConnectionManager connection managers} for
* a fine-grained control of connections on a per route basis.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -43,8 +43,6 @@ import org.apache.http.conn.routing.HttpRoute;
* An adaptor for accessing route related parameters in {@link HttpParams}.
* See {@link ConnRoutePNames} for parameter name definitions.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
* @version $Revision$
*

View File

@ -37,7 +37,6 @@ package org.apache.http.conn.routing;
* Basic implementation of an {@link HttpRouteDirector HttpRouteDirector}.
* This implementation is stateless and therefore thread-safe.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -40,7 +40,6 @@ import org.apache.http.HttpHost;
* Instances of this class are unmodifiable and therefore suitable
* for use as lookup keys.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -38,7 +38,6 @@ package org.apache.http.conn.routing;
* Implementations of this interface compare a planned route with
* a tracked route and indicate the next step required.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -39,7 +39,6 @@ import org.apache.http.HttpHost;
/**
* Read-only interface for route information.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -39,7 +39,6 @@ import org.apache.http.HttpHost;
/**
* Helps tracking the steps in establishing a route.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -39,8 +39,6 @@ import java.net.UnknownHostException;
* A {@link SocketFactory SocketFactory} for layered sockets (SSL/TLS).
* See there for things to consider when implementing a socket factory.
*
* @author Michael Becke
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @since 4.0
*/
public interface LayeredSocketFactory extends SocketFactory {

View File

@ -44,8 +44,6 @@ import org.apache.http.params.HttpParams;
/**
* The default class for creating sockets.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
* @author Michael Becke
*/
public final class PlainSocketFactory implements SocketFactory {

View File

@ -49,10 +49,6 @@ import org.apache.http.util.LangUtils;
* SchemeRegistry.DEFAULT.register(https);
* </pre>
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
* @author Michael Becke
* @author Jeff Dever
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
*/
public final class Scheme {

View File

@ -41,7 +41,6 @@ import org.apache.http.HttpHost;
* A set of supported protocol {@link Scheme schemes}.
* Schemes are identified by lowercase names.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
*
* <!-- empty lines to avoid svn diff problems -->

View File

@ -47,9 +47,6 @@ import org.apache.http.params.HttpParams;
* and {@link java.lang.Object#hashCode() Object.hashCode()}
* must be overridden for the correct operation of some connection managers.
*
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
* @author Michael Becke
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
*/
public interface SocketFactory {

View File

@ -56,7 +56,6 @@ import javax.net.ssl.SSLSocket;
* Abstract base class for all standard {@link X509HostnameVerifier}
* implementations.
*
* @author Julius Davies
*/
public abstract class AbstractVerifier implements X509HostnameVerifier {

View File

@ -35,7 +35,6 @@ package org.apache.http.conn.ssl;
* The ALLOW_ALL HostnameVerifier essentially turns hostname verification
* off. This implementation is a no-op, and never throws the SSLException.
*
* @author Julius Davies
*/
public class AllowAllHostnameVerifier extends AbstractVerifier {

View File

@ -43,7 +43,6 @@ import javax.net.ssl.SSLException;
* (such as "*.foo.com") with BROWSER_COMPATIBLE matches all subdomains,
* including "a.b.foo.com".
*
* @author Julius Davies
*/
public class BrowserCompatHostnameVerifier extends AbstractVerifier {

View File

@ -134,8 +134,6 @@ import java.security.UnrecoverableKeyException;
* </p>
* </li>
* </ul>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author Julius Davies
*/
public class SSLSocketFactory implements LayeredSocketFactory {

View File

@ -50,7 +50,6 @@ import javax.net.ssl.SSLException;
* level, for example "a.foo.com". It does not match deeper subdomains
* such as "a.b.foo.com".
*
* @author Julius Davies
*/
public class StrictHostnameVerifier extends AbstractVerifier {

View File

@ -52,8 +52,6 @@ import java.security.cert.X509Certificate;
* Inspired by Sebastian Hauer's original StrictSSLProtocolSocketFactory in the
* HttpClient "contrib" repository.
*
* @author Julius Davies
* @author <a href="mailto:hauer@psicode.com">Sebastian Hauer</a>
*
* @since 4.0 (8-Dec-2006)
*/

View File

@ -40,7 +40,6 @@ package org.apache.http.cookie;
* <tt>Cookie</tt> header should include certain attributes only if
* they were specified in the <tt>Set-Cookie</tt> header.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -38,7 +38,6 @@ import java.util.Date;
* that the HTTP agent and the target server can exchange to maintain
* a session.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -39,7 +39,6 @@ package org.apache.http.cookie;
* implementation for this class based on their cookie handling
* rules.
*
* @author jain.samit@gmail.com (Samit Jain)
*
* @since 4.0
*/

View File

@ -42,7 +42,6 @@ import java.util.Comparator;
* their domain attributes match ignoring case.
* </p>
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public class CookieIdentityComparator implements Serializable, Comparator<Cookie> {

View File

@ -36,7 +36,6 @@ import java.util.Locale;
* CookieOrigin class incapsulates details of an origin server that
* are relevant when parsing, validating or matching HTTP cookies.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -46,7 +46,6 @@ import java.util.Comparator;
* comparison is undefined.
* </p>
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public class CookiePathComparator implements Serializable, Comparator<Cookie> {

View File

@ -45,8 +45,6 @@ import org.apache.http.Header;
* </ul>
* for a given host, port and path of origin
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
*
* @since 4.0
*/

View File

@ -35,7 +35,6 @@ import org.apache.http.params.HttpParams;
/**
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -44,8 +44,6 @@ import org.apache.http.params.HttpParams;
* cookie specification implementation for a given type of type or version of
* cookie.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
*
* @since 4.0
*/

View File

@ -37,7 +37,6 @@ import org.apache.http.ProtocolException;
* Signals that a cookie is in some way invalid or illegal in a given
* context
*
* @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -34,7 +34,6 @@ package org.apache.http.cookie;
/**
* Constants and static helpers related to the HTTP state management.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -37,7 +37,6 @@ import java.util.Date;
* This interface represents a <code>SetCookie</code> response header sent by the
* origin server to the HTTP agent in order to maintain a conversational state.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -35,7 +35,6 @@ package org.apache.http.cookie;
* This interface represents a <code>SetCookie2</code> response header sent by the
* origin server to the HTTP agent in order to maintain a conversational state.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -34,7 +34,6 @@ package org.apache.http.cookie.params;
/**
* Parameter names for cookie specifications in HttpCookie.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*

View File

@ -45,7 +45,6 @@ import org.apache.http.util.CharArrayBuffer;
* does not make any assumptions regarding the format of the challenge
* nor does it impose any specific way of responding to that challenge.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*/
public abstract class AuthSchemeBase implements AuthScheme {

View File

@ -47,14 +47,6 @@ import org.apache.http.util.EncodingUtils;
* Basic authentication scheme as defined in RFC 2617.
* </p>
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
* @author Rodney Waldhoff
* @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
* @author Ortwin Glueck
* @author Sean C. Sullivan
* @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a>
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -37,7 +37,6 @@ import org.apache.http.params.HttpParams;
/**
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -67,14 +67,6 @@ import org.apache.http.util.EncodingUtils;
* http element charset}.
* </p>
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
* @author Rodney Waldhoff
* @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
* @author Ortwin Glueck
* @author Sean C. Sullivan
* @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a>
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

View File

@ -37,7 +37,6 @@ import org.apache.http.params.HttpParams;
/**
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @since 4.0
*/

Some files were not shown because too many files have changed in this diff Show More