Fossil SCM
Merge trunk into dmitry-security branch.
Commit
f4eb0f5afcb335986220891e3d571712ad204337
Parent
d244c484e73e5eb…
3 files changed
+1
-1
+3
-3
+1
-1
+1
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -325,11 +325,11 @@ | ||
| 325 | 325 | */ |
| 326 | 326 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 327 | 327 | time_t expires = time(0) + 604800; |
| 328 | 328 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 329 | 329 | }else{ |
| 330 | - fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); | |
| 330 | + fprintf(g.httpOut, "Cache-control: no-cache\r\n"); | |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | /* Content intended for logged in users should only be cached in |
| 334 | 334 | ** the browser, not some shared location. |
| 335 | 335 | */ |
| 336 | 336 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -325,11 +325,11 @@ | |
| 325 | */ |
| 326 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 327 | time_t expires = time(0) + 604800; |
| 328 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 329 | }else{ |
| 330 | fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); |
| 331 | } |
| 332 | |
| 333 | /* Content intended for logged in users should only be cached in |
| 334 | ** the browser, not some shared location. |
| 335 | */ |
| 336 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -325,11 +325,11 @@ | |
| 325 | */ |
| 326 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 327 | time_t expires = time(0) + 604800; |
| 328 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 329 | }else{ |
| 330 | fprintf(g.httpOut, "Cache-control: no-cache\r\n"); |
| 331 | } |
| 332 | |
| 333 | /* Content intended for logged in users should only be cached in |
| 334 | ** the browser, not some shared location. |
| 335 | */ |
| 336 |
+3
-3
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -200,16 +200,16 @@ | ||
| 200 | 200 | |
| 201 | 201 | /* |
| 202 | 202 | ** Receive content back from the open socket connection. |
| 203 | 203 | */ |
| 204 | 204 | size_t socket_receive(void *NotUsed, void *pContent, size_t N){ |
| 205 | - size_t got; | |
| 205 | + ssize_t got; | |
| 206 | 206 | size_t total = 0; |
| 207 | 207 | while( N>0 ){ |
| 208 | 208 | got = recv(iSocket, pContent, N, 0); |
| 209 | 209 | if( got<=0 ) break; |
| 210 | - total += got; | |
| 211 | - N -= got; | |
| 210 | + total += (size_t)got; | |
| 211 | + N -= (size_t)got; | |
| 212 | 212 | pContent = (void*)&((char*)pContent)[got]; |
| 213 | 213 | } |
| 214 | 214 | return total; |
| 215 | 215 | } |
| 216 | 216 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -200,16 +200,16 @@ | |
| 200 | |
| 201 | /* |
| 202 | ** Receive content back from the open socket connection. |
| 203 | */ |
| 204 | size_t socket_receive(void *NotUsed, void *pContent, size_t N){ |
| 205 | size_t got; |
| 206 | size_t total = 0; |
| 207 | while( N>0 ){ |
| 208 | got = recv(iSocket, pContent, N, 0); |
| 209 | if( got<=0 ) break; |
| 210 | total += got; |
| 211 | N -= got; |
| 212 | pContent = (void*)&((char*)pContent)[got]; |
| 213 | } |
| 214 | return total; |
| 215 | } |
| 216 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -200,16 +200,16 @@ | |
| 200 | |
| 201 | /* |
| 202 | ** Receive content back from the open socket connection. |
| 203 | */ |
| 204 | size_t socket_receive(void *NotUsed, void *pContent, size_t N){ |
| 205 | ssize_t got; |
| 206 | size_t total = 0; |
| 207 | while( N>0 ){ |
| 208 | got = recv(iSocket, pContent, N, 0); |
| 209 | if( got<=0 ) break; |
| 210 | total += (size_t)got; |
| 211 | N -= (size_t)got; |
| 212 | pContent = (void*)&((char*)pContent)[got]; |
| 213 | } |
| 214 | return total; |
| 215 | } |
| 216 |
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -217,11 +217,11 @@ | ||
| 217 | 217 | upr = mid - 1; |
| 218 | 218 | }else{ |
| 219 | 219 | lwr = mid + 1; |
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | - for(m=cnt=0, i=upr-2; i<=upr+3 && i<nMap; i++){ | |
| 222 | + for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){ | |
| 223 | 223 | if( i<0 ) continue; |
| 224 | 224 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 225 | 225 | m = i; |
| 226 | 226 | cnt++; |
| 227 | 227 | } |
| 228 | 228 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -217,11 +217,11 @@ | |
| 217 | upr = mid - 1; |
| 218 | }else{ |
| 219 | lwr = mid + 1; |
| 220 | } |
| 221 | } |
| 222 | for(m=cnt=0, i=upr-2; i<=upr+3 && i<nMap; i++){ |
| 223 | if( i<0 ) continue; |
| 224 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 225 | m = i; |
| 226 | cnt++; |
| 227 | } |
| 228 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -217,11 +217,11 @@ | |
| 217 | upr = mid - 1; |
| 218 | }else{ |
| 219 | lwr = mid + 1; |
| 220 | } |
| 221 | } |
| 222 | for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){ |
| 223 | if( i<0 ) continue; |
| 224 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 225 | m = i; |
| 226 | cnt++; |
| 227 | } |
| 228 |