Changeset 3663
- Timestamp:
- 2003-01-10T16:35:04+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/receptionist.cpp
r3546 r3663 764 764 // content response 765 765 766 #ifdef GSDL_NOCACHE 767 contentout << "Expires: Mon, 26 Jul 1997 05:00:00 GMT\n"; // date in the past 768 tm *tm_ptr = NULL; 769 time_t t = time(NULL); 770 tm_ptr = gmtime (&t); 771 if (tm_ptr != NULL) { 772 char *timestr = new char[128]; 773 strftime (timestr, 128, "%a, %d %b %Y %H:%M:%S", tm_ptr); 774 contentout << "Last-Modified: " << timestr << " GMT\n"; // always modified 775 delete timestr; 776 } 777 contentout << "Cache-Control: no-cache, must-revalidate\n"; // HTTP/1.1 778 contentout << "Pragma: no-cache\n"; // HTTP/1.0 779 780 #else 781 766 782 // use the later of build.cfg and collect.cfg modification times 767 783 // as the Last-Modified: header, for caching values … … 804 820 contentout << "Last-Modified: " << asctime(utc_latest); 805 821 } 806 807 822 } // end of collection != "" 808 823 809 /* 810 // This block of code should prevent the users browser from caching 811 // the page. It may be useful to uncomment this code and comment out 812 // that directly above (which sets a "Last-Modified" header) when 813 // doing interface development work where a given page may be 814 // changing often. 815 816 contentout << "Expires: Mon, 26 Jul 1997 05:00:00 GMT\n"; // date in the past 817 tm *tm_ptr = NULL; 818 time_t t = time(NULL); 819 tm_ptr = gmtime (&t); 820 if (tm_ptr != NULL) { 821 char *timestr = new char[128]; 822 strftime (timestr, 128, "%a, %d %b %Y %H:%M:%S", tm_ptr); 823 contentout << "Last-Modified: " << timestr << " GMT\n"; // always modified 824 delete timestr; 825 } 826 contentout << "Cache-Control: no-cache, must-revalidate\n"; // HTTP/1.1 827 contentout << "Pragma: no-cache\n"; // HTTP/1.0 828 */ 824 #endif 825 829 826 contentout << text_t2ascii << "Content-type: " << response_data << "\n\n"; 830 827 } else {
Note:
See TracChangeset
for help on using the changeset viewer.