X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=parsers.c;h=6c952c90b70d135eb486cc035fb831ea30254e4f;hb=51ed536d35f5187b9b3d58627201cc2bda010770;hp=5ff9eea9503b58880b00cdbb9587a2b610f6738b;hpb=41a08949498020a8f9ec18c08e16141057ebd546;p=privoxy.git diff --git a/parsers.c b/parsers.c index 5ff9eea9..6c952c90 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.122 2008/03/28 15:13:39 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.125 2008/04/17 14:40:49 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -44,6 +44,17 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.122 2008/03/28 15:13:39 fabiankei * * Revisions : * $Log: parsers.c,v $ + * Revision 1.125 2008/04/17 14:40:49 fabiankeil + * Provide get_http_time() with the buffer size so it doesn't + * have to blindly assume that the buffer is big enough. + * + * Revision 1.124 2008/04/16 16:38:21 fabiankeil + * Don't pass the whole csp structure to flush_socket() + * when it only needs a file descriptor and a buffer. + * + * Revision 1.123 2008/03/29 12:13:46 fabiankeil + * Remove send-wafer and send-vanilla-wafer actions. + * * Revision 1.122 2008/03/28 15:13:39 fabiankeil * Remove inspect-jpegs action. * @@ -936,7 +947,7 @@ const add_header_func_ptr add_server_headers[] = { * * Parameters : * 1 : fd = file descriptor of the socket to read - * 2 : csp = Current client state (buffers, headers, etc...) + * 2 : iob = The I/O buffer to flush, usually csp->iob. * * Returns : On success, the number of bytes written are returned (zero * indicates nothing was written). On error, -1 is returned, @@ -946,9 +957,8 @@ const add_header_func_ptr add_server_headers[] = { * file, the results are not portable. * *********************************************************************/ -int flush_socket(jb_socket fd, struct client_state *csp) +int flush_socket(jb_socket fd, struct iob *iob) { - struct iob *iob = csp->iob; int len = iob->eod - iob->cur; if (len <= 0) @@ -2580,7 +2590,7 @@ static jb_err server_last_modified(struct client_state *csp, char **header) /* * Setting Last-Modified Header to now. */ - get_http_time(0, buf); + get_http_time(0, buf, sizeof(buf)); freez(*header); *header = strdup("Last-Modified: "); string_append(header, buf); @@ -3465,7 +3475,7 @@ jb_err client_x_filter(struct client_state *csp, char **header) *********************************************************************/ static jb_err client_range(struct client_state *csp, char **header) { - if (content_filters_enabled(csp)) + if (content_filters_enabled(csp->action)) { log_error(LOG_LEVEL_HEADER, "Content filtering is enabled." " Crunching: \'%s\' to prevent range-mismatch problems.", *header);