comparison src/html.c @ 1092:a930439f29b1

[gaim-migrate @ 1102] fun fun committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 13 Nov 2000 04:29:41 +0000
parents 18a14e6dd0af
children b5783215b245
comparison
equal deleted inserted replaced
1091:3d6ab4f1fa55 1092:a930439f29b1
35 #include <sys/socket.h> 35 #include <sys/socket.h>
36 #include <netdb.h> 36 #include <netdb.h>
37 #include <netinet/in.h> 37 #include <netinet/in.h>
38 #include <fcntl.h> 38 #include <fcntl.h>
39 #include <errno.h> 39 #include <errno.h>
40 #include "proxy.h"
40 41
41 gchar * strip_html(gchar * text) 42 gchar * strip_html(gchar * text)
42 { 43 {
43 int i, j; 44 int i, j;
44 int visible = 1; 45 int visible = 1;
106 char *webdata = NULL; 107 char *webdata = NULL;
107 int sock; 108 int sock;
108 int len; 109 int len;
109 int read_rv; 110 int read_rv;
110 int datalen = 0; 111 int datalen = 0;
111 struct in_addr *host;
112 char buf[256]; 112 char buf[256];
113 char data; 113 char data;
114 int startsaving = 0; 114 int startsaving = 0;
115 GtkWidget *pw = NULL, *pbar = NULL, *label; 115 GtkWidget *pw = NULL, *pbar = NULL, *label;
116 116
117 website = parse_url(url); 117 website = parse_url(url);
118 118
119 if (user) { 119 if (user) {
120 if ((sock = proxy_connect(website.address, website.port, user->proto_opt[2], 120 if ((sock = proxy_connect(website.address, website.port, user->proto_opt[2],
121 user->proto_opt[3], atoi(user->proto_opt[4]))) < 0) 121 atoi(user->proto_opt[3]), atoi(user->proto_opt[4]))) < 0)
122 return g_strdup(_("g003: Error opening connection.\n")); 122 return g_strdup(_("g003: Error opening connection.\n"));
123 } else { 123 } else {
124 if ((sock = proxy_connect(website.address, website.port, NULL, NULL, -1)) < 0) 124 if ((sock = proxy_connect(website.address, website.port, NULL, 0, -1)) < 0)
125 return g_strdup(_("g003: Error opening connection.\n")); 125 return g_strdup(_("g003: Error opening connection.\n"));
126 } 126 }
127 127
128 g_snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", website.page); 128 g_snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", website.page);
129 g_snprintf(debug_buff, sizeof(debug_buff), "Request: %s\n", buf); 129 g_snprintf(debug_buff, sizeof(debug_buff), "Request: %s\n", buf);