WordPress.org

Make WordPress Core

Changeset 14050


Ignore:
Timestamp:
04/10/2010 11:23:21 AM (9 years ago)
Author:
nacin
Message:

Clean up the HTTP inline docs to reflect the times. props jacobsantos, fixes #12882.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-http.php

    r13887 r14050  
    33 * Simple and uniform HTTP request API.
    44 *
    5  * Will eventually replace and standardize the WordPress HTTP requests made.
     5 * Standardizes the HTTP requests for WordPress. Handles cookies, gzip encoding and decoding, chunk
     6 * decoding, if HTTP 1.1 and various other difficult HTTP protocol implementations.
    67 *
    78 * @link http://trac.wordpress.org/ticket/4779 HTTP API Proposal
     
    1516 * WordPress HTTP Class for managing HTTP Transports and making HTTP requests.
    1617 *
    17  * This class is called for the functionality of making HTTP requests and should replace Snoopy
    18  * functionality, eventually. There is no available functionality to add HTTP transport
    19  * implementations, since most of the HTTP transports are added and available for use.
    20  *
    21  * The exception is that cURL is not available as a transport and lacking an implementation. It will
    22  * be added later and should be a patch on the WordPress Trac.
     18 * This class is called for the functionality of making HTTP requests and replaces Snoopy
     19 * functionality. There is no available functionality to add HTTP transport implementations, since
     20 * most of the HTTP transports are added and available for use.
    2321 *
    2422 * There are no properties, because none are needed and for performance reasons. Some of the
     
    5351     * PHP5 style Constructor - Set up available transport if not available.
    5452     *
    55      * PHP4 does not have the 'self' keyword and since WordPress supports PHP4,
    56      * the class needs to be used for the static call.
    57      *
    58      * The transport are set up to save time. This should only be called once, so
    59      * the overhead should be fine.
     53     * PHP4 does not have the 'self' keyword and since WordPress supports PHP4, the class needs to
     54     * be used for the static call. The transport are set up to save time and will only be created
     55     * once. This class can be created many times without having to go through the step of finding
     56     * which transports are available.
    6057     *
    6158     * @since 2.7.0
     
    7067     * Tests the WordPress HTTP objects for an object to use and returns it.
    7168     *
    72      * Tests all of the objects and returns the object that passes. Also caches
    73      * that object to be used later.
    74      *
    75      * The order for the GET/HEAD requests are HTTP Extension, cURL, Streams, Fopen,
    76      * and finally Fsockopen. fsockopen() is used last, because it has the most
    77      * overhead in its implementation. There isn't any real way around it, since
    78      * redirects have to be supported, much the same way the other transports
    79      * also handle redirects.
    80      *
    81      * There are currently issues with "localhost" not resolving correctly with
    82      * DNS. This may cause an error "failed to open stream: A connection attempt
    83      * failed because the connected party did not properly respond after a
    84      * period of time, or established connection failed because connected host
    85      * has failed to respond."
     69     * Tests all of the objects and returns the object that passes. Also caches that object to be
     70     * used later.
     71     *
     72     * The order for the GET/HEAD requests are HTTP Extension, cURL, Streams, Fopen, and finally
     73     * Fsockopen. fsockopen() is used last, because it has the most overhead in its implementation.
     74     * There isn't any real way around it, since redirects have to be supported, much the same way
     75     * the other transports also handle redirects.
     76     *
     77     * There are currently issues with "localhost" not resolving correctly with DNS. This may cause
     78     * an error "failed to open stream: A connection attempt failed because the connected party did
     79     * not properly respond after a period of time, or established connection failed because [the]
     80     * connected host has failed to respond."
    8681     *
    8782     * @since 2.7.0
Note: See TracChangeset for help on using the changeset viewer.