Changeset ab19567 for protocols/twitter


Ignore:
Timestamp:
2013-06-16T12:15:15Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1a2c1c0
Parents:
41a94dd (diff), dd7b931 (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 HTTP/1.1 branch. This implements HTTP/1.1 support in http_client.
Little benefit as I'm not burning my fingers on keepalive connecitons for
now, but eventually the Twitter streaming API is going to drop 1.0 support:
https://dev.twitter.com/blog/deprecating-http-1.0-streaming-api

Location:
protocols/twitter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r41a94dd rab19567  
    289289        char *def_url;
    290290        char *def_tul;
     291        char *def_mentions;
    291292
    292293        if (strcmp(acc->prpl->name, "twitter") == 0) {
    293294                def_url = TWITTER_API_URL;
    294295                def_tul = "20";
     296                def_mentions = "true";
    295297        } else {                /* if( strcmp( acc->prpl->name, "identica" ) == 0 ) */
    296298                def_url = IDENTICA_API_URL;
    297299                def_tul = "0";
     300                def_mentions = "false";
    298301        }
    299302
     
    308311        s->flags |= ACC_SET_OFFLINE_ONLY;
    309312
    310         s = set_add(&acc->set, "fetch_mentions", "true", set_eval_bool, acc);
     313        s = set_add(&acc->set, "fetch_mentions", def_mentions, set_eval_bool, acc);
    311314
    312315        s = set_add(&acc->set, "message_length", "140", set_eval_int, acc);
  • protocols/twitter/twitter_http.c

    r41a94dd rab19567  
    7878       
    7979        // Make the request.
    80         g_string_printf(request, "%s %s%s%s%s HTTP/1.0\r\n"
     80        g_string_printf(request, "%s %s%s%s%s HTTP/1.1\r\n"
    8181                        "Host: %s\r\n"
    8282                        "User-Agent: BitlBee " BITLBEE_VERSION " " ARCH "/" CPU "\r\n",
Note: See TracChangeset for help on using the changeset viewer.