Mercurial > pidgin
comparison src/proxy.c @ 1705:b4d454e5ee31
[gaim-migrate @ 1715]
possible fixes?
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Thu, 12 Apr 2001 23:08:37 +0000 |
| parents | c0ab844d4790 |
| children | 00aef397a1fe |
comparison
equal
deleted
inserted
replaced
| 1704:07097db15338 | 1705:b4d454e5ee31 |
|---|---|
| 94 if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { | 94 if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { |
| 95 close(fd); | 95 close(fd); |
| 96 return -1; | 96 return -1; |
| 97 } | 97 } |
| 98 | 98 |
| 99 snprintf(cmd, sizeof(cmd), "CONNECT %s:%d HTTP/1.1\n\r\n\r", host, port); | 99 snprintf(cmd, sizeof(cmd), "CONNECT %s:%d HTTP/1.1\r\n\r\n", host, port); |
| 100 | 100 |
| 101 if (send(fd, cmd, strlen(cmd), 0) < 0) { | 101 if (send(fd, cmd, strlen(cmd), 0) < 0) { |
| 102 close(fd); | 102 close(fd); |
| 103 return -1; | 103 return -1; |
| 104 } | 104 } |
| 106 if (inputline[pos-1] == '\n') | 106 if (inputline[pos-1] == '\n') |
| 107 nlc++; | 107 nlc++; |
| 108 else if (inputline[pos-1] != '\r') | 108 else if (inputline[pos-1] != '\r') |
| 109 nlc = 0; | 109 nlc = 0; |
| 110 } | 110 } |
| 111 | |
| 112 debug_printf("Proxy says: %s\n", inputline); | |
| 111 | 113 |
| 112 if ((memcmp(HTTP_GOODSTRING, inputline, strlen(HTTP_GOODSTRING)) == 0) || | 114 if ((memcmp(HTTP_GOODSTRING, inputline, strlen(HTTP_GOODSTRING)) == 0) || |
| 113 (memcmp(HTTP_GOODSTRING2, inputline, strlen(HTTP_GOODSTRING2)) == 0)) { | 115 (memcmp(HTTP_GOODSTRING2, inputline, strlen(HTTP_GOODSTRING2)) == 0)) { |
| 114 return fd; | 116 return fd; |
| 115 } | 117 } |
