]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove several unnecessary uses of putStrf and a compile error
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Oct 2008 11:29:06 +0000 (00:29 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Oct 2008 11:29:06 +0000 (00:29 +1300)
src/errorpage.cc

index 21f2926a29b4609bd77fa2a0b4eda012d790ae8d..50f40191d9277e5a3726cded2b037b7f5ff09a95 100644 (file)
@@ -866,13 +866,13 @@ ErrorState::BuildHttpReply()
          */
         if(!Config.errorDirectory) {
             /* We 'negotiated' this ONLY from the Accept-Language. */
-            httpHeaderDelById(&rep->header, HDR_VARY);
-            httpHeaderPutStrf(&rep->header, HDR_VARY, "Accept-Language");
+            rep->header.delById(HDR_VARY);
+            rep->header.putStr(HDR_VARY, "Accept-Language");
         }
 
         /* add the Content-Language header according to RFC section 14.12 */
         if(err_language) {
-            httpHeaderPutStrf(&rep->header, HDR_CONTENT_LANGUAGE, "%s", err_language);
+            rep->header.putStr(HDR_CONTENT_LANGUAGE, err_language);
         }
         else
 #endif /* USE_ERROR_LOCALES */
@@ -880,7 +880,7 @@ ErrorState::BuildHttpReply()
             /* default templates are in English */
             /* language is known unless error_directory override used */
             if(!Config.errorDirectory)
-                httpHeaderPutStrf(&rep->header, HDR_CONTENT_LANGUAGE, "en");
+                rep->header.putStr(HDR_CONTENT_LANGUAGE, "en");
         }
 
         httpBodySet(&rep->body, content);