logo       

current parsers.c,1.117,1.118: msg#00067

web.privoxy.cvs

Subject: current parsers.c,1.117,1.118

Update of /cvsroot/ijbswa/current
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv28387

Modified Files:
parsers.c
Log Message:
Minor server_content_disposition() changes:
- Don't regenerate the header name all lower-case.
- Some white space fixes.
- Remove useless log message in case of ENOMEM.


Index: parsers.c
===================================================================
RCS file: /cvsroot/ijbswa/current/parsers.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- parsers.c 6 Dec 2007 18:11:50 -0000 1.117
+++ parsers.c 28 Dec 2007 16:56:35 -0000 1.118
@@ -44,6 +44,12 @@
*
* Revisions :
* $Log$
+ * Revision 1.118 2007/12/28 16:56:35 fabiankeil
+ * Minor server_content_disposition() changes:
+ * - Don't regenerate the header name all lower-case.
+ * - Some white space fixes.
+ * - Remove useless log message in case of ENOMEM.
+ *
* Revision 1.117 2007/12/06 18:11:50 fabiankeil
* Garbage-collect the code to add a X-Forwarded-For
* header as it seems to be mostly used by accident.
@@ -2447,7 +2453,7 @@
*
* Function : server_content_disposition
*
- * Description : If enabled, blocks or modifies the "content-disposition"
header.
+ * Description : If enabled, blocks or modifies the "Content-Disposition"
header.
* Called from `sed'.
*
* Parameters :
@@ -2466,17 +2472,17 @@
const char *newval;

/*
- * Are we messing with the content-disposition header?
+ * Are we messing with the Content-Disposition header?
*/
if ((csp->action->flags & ACTION_HIDE_CONTENT_DISPOSITION) == 0)
{
- /*Me tinks not*/
+ /* Me tinks not */
return JB_ERR_OK;
}

newval = csp->action->string[ACTION_STRING_CONTENT_DISPOSITION];

- if ((newval == NULL) || (0 == strcmpic(newval, "block")) )
+ if ((newval == NULL) || (0 == strcmpic(newval, "block")))
{
/*
* Blocking content-disposition header
@@ -2488,19 +2494,16 @@
else
{
/*
- * Replacing content-disposition header
+ * Replacing Content-Disposition header
*/
freez(*header);
- *header = strdup("content-disposition: ");
- string_append(header, newval);
+ *header = strdup("Content-Disposition: ");
+ string_append(header, newval);

- if (*header == NULL)
- {
- log_error(LOG_LEVEL_HEADER, "Insufficent memory. content-disposition
header not fully replaced.");
- }
- else
+ if (*header != NULL)
{
- log_error(LOG_LEVEL_HEADER, "content-disposition header crunched and
replaced with: %s", *header);
+ log_error(LOG_LEVEL_HEADER,
+ "Content-Disposition header crunched and replaced with: %s",
*header);
}
}
return (*header == NULL) ? JB_ERR_MEMORY : JB_ERR_OK;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise