Fossil

Check-in [ca61c5e9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add keep-alive for unauthenticated proxy tunnels. Remove port number from host.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | jan-httpsproxytunnel
Files: files | file ages | folders
SHA1:ca61c5e992a1513e209474bd4b4f9a54d3e3ffe4
User & Date: jan 2013-10-17 09:31:34
Context
2013-10-17
10:04
Include User-Agent when connecting to proxy for https tunnels. Fixed a misplaced EOL. check-in: 08b02fe8 user: jan tags: jan-httpsproxytunnel
09:31
Add keep-alive for unauthenticated proxy tunnels. Remove port number from host. check-in: ca61c5e9 user: jan tags: jan-httpsproxytunnel
09:07
Make proxy connection 'keep-alive' for https tunnel. check-in: ca82d0c1 user: jan tags: jan-httpsproxytunnel
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/http_ssl.c.

179
180
181
182
183
184
185

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
static int establish_proxy_tunnel(BIO *bio){
  int rc, httpVerMin;
  char *connStr, *bbuf;
  Blob reply;
  int done=0,end=0;
  if( !g.urlProxyAuth ){
    connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n"

          "Host: %s:%d\r\n\r\n", g.urlHostname, g.proxyOrigPort,
          g.urlHostname, g.proxyOrigPort);
  }else{
    connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n"
          "Host: %s:%d\r\n"
          "Proxy-Connection: keep-alive\r\n"
          "Proxy-Authorization: %s\r\n\r\n", g.urlHostname, g.proxyOrigPort,
          g.urlHostname, g.proxyOrigPort, g.urlProxyAuth);
  }
  BIO_write(bio, connStr, strlen(connStr));
  free(connStr);

  /* Wait for end of reply */
  blob_zero(&reply);
  do{







>
|
|


|


|







179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
static int establish_proxy_tunnel(BIO *bio){
  int rc, httpVerMin;
  char *connStr, *bbuf;
  Blob reply;
  int done=0,end=0;
  if( !g.urlProxyAuth ){
    connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n"
          "Host: %s\r\n\r\n"
          "Proxy-Connection: keep-alive\r\n", g.urlHostname, g.proxyOrigPort,
          g.urlHostname);
  }else{
    connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n"
          "Host: %s\r\n"
          "Proxy-Connection: keep-alive\r\n"
          "Proxy-Authorization: %s\r\n\r\n", g.urlHostname, g.proxyOrigPort,
          g.urlHostname, g.urlProxyAuth);
  }
  BIO_write(bio, connStr, strlen(connStr));
  free(connStr);

  /* Wait for end of reply */
  blob_zero(&reply);
  do{