Changeset 7885d0f for lib/http_client.c


Ignore:
Timestamp:
2010-07-15T23:23:04Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
516a9c6
Parents:
e4e0b37
Message:

Don't be a dumbass and stop following redirects if there doesn't seem to
be an end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/http_client.c

    re4e0b37 r7885d0f  
    6767        req->request = g_strdup( request );
    6868        req->request_length = strlen( request );
     69        req->redir_ttl = 3;
    6970       
    7071        return( req );
     
    311312        }
    312313       
    313         if( req->status_code == 301 || req->status_code == 302 )
     314        if( ( req->status_code == 301 || req->status_code == 302 ) && req->redir_ttl-- > 0 )
    314315        {
    315316                char *loc, *new_request, *new_host;
Note: See TracChangeset for help on using the changeset viewer.