Changeset 4346c3f4 for lib/http_client.c


Ignore:
Timestamp:
2010-07-16T23:31:55Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e437366
Parents:
3709301 (diff), ef14a83 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/http_client.c

    r3709301 r4346c3f4  
    3535static gboolean http_ssl_connected( gpointer data, void *source, b_input_condition cond );
    3636static gboolean http_incoming_data( gpointer data, int source, b_input_condition cond );
    37 
    38 
    39 void *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data )
     37static void http_free( struct http_request *req );
     38
     39
     40struct http_request *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data )
    4041{
    4142        struct http_request *req;
     
    6768        req->request = g_strdup( request );
    6869        req->request_length = strlen( request );
     70        req->redir_ttl = 3;
    6971       
    7072        return( req );
    7173}
    7274
    73 void *http_dorequest_url( char *url_string, http_input_function func, gpointer data )
     75struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data )
    7476{
    7577        url_t *url = g_new0( url_t, 1 );
     
    311313        }
    312314       
    313         if( req->status_code == 301 || req->status_code == 302 )
     315        if( ( req->status_code == 301 || req->status_code == 302 ) && req->redir_ttl-- > 0 )
    314316        {
    315317                char *loc, *new_request, *new_host;
     
    445447}
    446448
    447 void http_free( struct http_request *req )
     449static void http_free( struct http_request *req )
    448450{
    449451        g_free( req->request );
Note: See TracChangeset for help on using the changeset viewer.