Fossil

Check-in [723dedac]
Login

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

Overview
Comment:Fix the login mechanism on the new IPv6 code for "fossil server" on Windows. Patch from Olivier Mascia.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 723dedac57d107170316f72a4732e597e7c889feaaad7973d09c44898045b6e5
User & Date: drh 2018-01-02 11:37:29.732
Context
2018-01-03
18:56
Accept both "127.0.0.1" and "::ffff:127.0.0.1" as valid loopback IP addresses. ... (check-in: 96dcb7e7 user: drh tags: trunk)
2018-01-02
11:37
Fix the login mechanism on the new IPv6 code for "fossil server" on Windows. Patch from Olivier Mascia. ... (check-in: 723dedac user: drh tags: trunk)
2018-01-01
18:56
The "fossil server" command on windows now listens for both IPv4 and IPv6 connections. ... (check-in: 21d5038f user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/winhttp.c.
188
189
190
191
192
193
194

195
196
197
198
199
200
201
  }

  /*
  ** The repository name is only needed if there was no open checkout.  This
  ** is designed to allow the open checkout for the interactive user to work
  ** with the local Fossil server started via the "ui" command.
  */

  if( WSAAddressToStringA((SOCKADDR*)&p->addr, sizeof(p->addr),
                          NULL, zIp, &nIp)!=0 ){
    zIp[0] = 0;
  }
  if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
    assert( g.zRepositoryName && g.zRepositoryName[0] );
    sqlite3_snprintf(sizeof(zCmd), zCmd, "%s%s\n%s\n%s\n%s",







>







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
  }

  /*
  ** The repository name is only needed if there was no open checkout.  This
  ** is designed to allow the open checkout for the interactive user to work
  ** with the local Fossil server started via the "ui" command.
  */
  p->addr.sin6_port = 0;
  if( WSAAddressToStringA((SOCKADDR*)&p->addr, sizeof(p->addr),
                          NULL, zIp, &nIp)!=0 ){
    zIp[0] = 0;
  }
  if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
    assert( g.zRepositoryName && g.zRepositoryName[0] );
    sqlite3_snprintf(sizeof(zCmd), zCmd, "%s%s\n%s\n%s\n%s",
275
276
277
278
279
280
281

282
283
284
285
286
287
288
  while( wanted>amt ){
    got = recv(p->s, zHdr, wanted<sizeof(zHdr) ? wanted : sizeof(zHdr), 0);
    if( got<=0 ) break;
    fwrite(zHdr, 1, got, out);
    wanted += got;
  }
  assert( g.zRepositoryName && g.zRepositoryName[0] );

  if (WSAAddressToStringA((SOCKADDR*)&p->addr, sizeof(p->addr),
                          NULL, zIp, &nIp)!=0){
    zIp[0] = 0;
  }
  sqlite3_snprintf(sizeof(zCmd), zCmd,
    "\"%s\" http \"%s\" \"%s\" %s \"%s\" --scgi --nossl%s",
    g.nameOfExe, zRequestFName, zReplyFName, zIp,







>







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
  while( wanted>amt ){
    got = recv(p->s, zHdr, wanted<sizeof(zHdr) ? wanted : sizeof(zHdr), 0);
    if( got<=0 ) break;
    fwrite(zHdr, 1, got, out);
    wanted += got;
  }
  assert( g.zRepositoryName && g.zRepositoryName[0] );
  p->addr.sin6_port = 0;
  if (WSAAddressToStringA((SOCKADDR*)&p->addr, sizeof(p->addr),
                          NULL, zIp, &nIp)!=0){
    zIp[0] = 0;
  }
  sqlite3_snprintf(sizeof(zCmd), zCmd,
    "\"%s\" http \"%s\" \"%s\" %s \"%s\" --scgi --nossl%s",
    g.nameOfExe, zRequestFName, zReplyFName, zIp,