Overview
SHA1 Hash: | a742cfa29254d810f9119a065e391d4b74fb1b93 |
---|---|
Date: | 2009-04-11 13:07:01 |
User: | drh |
Comment: | Actually get the "file:" transport working this time. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/http_transport.c from [4dcbc27ce8] to [7621af4b14].
@@ -104,12 +104,12 @@ if( transport.pFile ){ fclose(transport.pFile); transport.pFile = 0; } unlink(transport.zInFile); - free(transport.zInFile); unlink(transport.zOutFile); + free(transport.zInFile); free(transport.zOutFile); }else{ socket_close(); } transport.isOpen = 0; @@ -143,11 +143,11 @@ void transport_flip(void){ if( g.urlIsFile ){ char *zCmd; fclose(transport.pFile); zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1", - g.argv[0], g.zRepositoryName, transport.zOutFile, transport.zInFile + g.argv[0], g.urlName, transport.zOutFile, transport.zInFile ); system(zCmd); free(zCmd); transport.pFile = fopen(transport.zInFile, "rb"); } @@ -189,11 +189,11 @@ int got; if( g.urlIsHttps ){ /* TBD */ got = 0; }else if( g.urlIsFile ){ - got = fread(zBuf, 0, N, transport.pFile); + got = fread(zBuf, 1, N, transport.pFile); }else{ got = socket_receive(0, zBuf, N); } if( got>0 ){ nByte += got;