Lines Matching defs:is

5  * This code is free software; you can redistribute it and/or modify it
11 * This code is distributed in the hope that it will be useful, but WITHOUT
14 * version 2 for more details (a copy is included in the LICENSE file that
113 * With the above system property set to true (default is false),
114 * when the response code is >=400, the HTTP handler will try to
117 * for reuse. The rationale behind this is that usually when the
130 * to be buffered; default is 300 ms
134 * default is 4k
156 * Additionally, any header starting with Sec- is
178 "Connection", /* close is allowed */
322 /* Set if the user is manually setting the Authorization or Proxy-Authorization headers */
366 * not set. This is to ensure backward compatibility.
430 * is restricted and throws IllegalArgumentException if invalid or
529 * For HTTP/1.1 the default behavior is to keep connections alive.
532 * or if keep alive is disabled via a system property
712 // when per connection proxy is set
720 /** this constructor is used by other protocol handlers such as ftp
907 * 3) is 2) fails, make direct connection
910 if (instProxy == null) { // no instance Proxy is set
1031 // Parse the response which is of the form:
1038 // Response code is 2nd token on the line
1256 /* make sure stream is closed */
1273 * In some cases, the Negotiate auth is supported for the
1275 * example, if the web page is located on a backend server
1276 * and delegation is needed but fails). The authentication
1280 * In order to achieve this, the inNegotiate flag is set
1281 * when the first negotiate challenge is met (and reset
1282 * if authentication is finished). If a fresh new negotiate
1283 * challenge (no parameter) is found while inNegotiate is
1288 * inNegotiateProxy is for proxy authentication.
1372 // The other 2 appearances of "new AuthenticationHeader" is
1498 // check if the path is shorter than the existing entry
1502 /* npath is longer, there must be a common root */
1514 // what we cache is based on the domain list in the request
1666 * there is no convenient APIs for doing so.
1704 * receiving a 407 is normal and we just skip the stale check
1767 // save current requests so that they can be restored after tunnel is setup.
1787 // There is no need to track progress in HTTP Tunneling,
1788 // so ProgressSource is null.
2101 * @param authHdr the AuthenticationHeader which tells what auth scheme is
2252 * force the call to check because this is the last chance to do so.
2383 * The second request is (erroneously) expected to be GET
2403 * And further, if http is null, there's no need to do anything
2405 * cachedInputStream/cachedHeaders anyway, which is returned by
2433 InputStream is = http.getInputStream();
2438 * if everything is not available immediately
2440 if ((is instanceof ChunkedInputStream) ||
2441 (is instanceof MeteredStream)) {
2443 while (is.read (cdata) > 0) {}
2459 if ((n = is.read (cdata)) == -1) {
2473 if (is instanceof MeteredStream) {
2474 is.close();
2540 * client has been returned to the cache (ie: stream is a keep
2548 * same server. The is okay because "disconnect" is an
2563 // if the connection is persistent it may have been closed
2615 // Filtering only if there is a cookie handler. [Assumption: the
2691 * response-header field names. Each Map value is an
2751 throw new NullPointerException ("key is null");
2763 * @param key the keyword by which the request is known
2774 throw new NullPointerException ("key is null");
2817 * field names. Each Map value is a unmodifiable List
2862 * 0 return implies that the option is disabled
2879 * reading from Input stream when a connection is established to a
2880 * resource. If the timeout expires before there is data available
2881 * for read, a java.net.SocketTimeoutException is raised. A
2882 * timeout of zero is interpreted as an infinite timeout.
2890 * @throws IllegalArgumentException if the timeout parameter is negative
2905 * option is disabled (i.e., timeout of infinity).
2946 /* The purpose of this wrapper is just to capture the close() call
2957 public HttpInputStream (InputStream is) {
2958 super (is);
2963 public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
2964 super (is);
3010 * the stream. Often this is most easily done by invoking some
3011 * general parser. If the stream is of the type handled by the
3012 * parse, it just chugs along happily. If the stream is not of
3145 * expectedLength == -1 if the stream is chunked
3146 * expectedLength > 0 if the stream is fixed content-length
3186 throw new IOException ("Stream is closed");
3196 /* this is called to check that all the bytes
3198 * and that the stream is now closed().
3234 InputStream is;
3238 is = null;
3241 private ErrorStream(ByteBuffer buf, InputStream is) {
3243 this.is = is;
3246 // when this method is called, it's either the case that cl > 0, or
3248 public static InputStream getErrorStream(InputStream is, long cl, HttpClient http) {
3250 // cl can't be 0; this following is here for extra precaution
3276 len = is.read(buffer, count,
3309 is.close();
3314 ByteBuffer.wrap(buffer, 0, count), is);
3326 if (is == null) {
3329 return buffer.remaining()+is.available();
3352 if (is == null) {
3355 return is.read(b, off, len);
3363 if (is != null) {
3364 is.close();
3370 /** An input stream that just returns EOF. This is for