Changeset 4346c3f4 for lib/http_client.c
- Timestamp:
- 2010-07-16T23:31:55Z (15 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/http_client.c
r3709301 r4346c3f4 35 35 static gboolean http_ssl_connected( gpointer data, void *source, b_input_condition cond ); 36 36 static 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 ) 37 static void http_free( struct http_request *req ); 38 39 40 struct http_request *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data ) 40 41 { 41 42 struct http_request *req; … … 67 68 req->request = g_strdup( request ); 68 69 req->request_length = strlen( request ); 70 req->redir_ttl = 3; 69 71 70 72 return( req ); 71 73 } 72 74 73 void*http_dorequest_url( char *url_string, http_input_function func, gpointer data )75 struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data ) 74 76 { 75 77 url_t *url = g_new0( url_t, 1 ); … … 311 313 } 312 314 313 if( req->status_code == 301 || req->status_code == 302)315 if( ( req->status_code == 301 || req->status_code == 302 ) && req->redir_ttl-- > 0 ) 314 316 { 315 317 char *loc, *new_request, *new_host; … … 445 447 } 446 448 447 void http_free( struct http_request *req )449 static void http_free( struct http_request *req ) 448 450 { 449 451 g_free( req->request );
Note: See TracChangeset
for help on using the changeset viewer.