]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ICAP/ICAPModXact.cc
Verified and converted more String users.
[thirdparty/squid.git] / src / ICAP / ICAPModXact.cc
index e714eaaacb4e662e210a30869ba219b497c85529..36e7c057e1a5809688dcb89e24d9d41b615126a1 100644 (file)
@@ -1038,13 +1038,17 @@ void ICAPModXact::makeRequestHeaders(MemBuf &buf)
 
     // we must forward "Proxy-Authenticate" and "Proxy-Authorization"
     // as ICAP headers.
-    if (virgin.header->header.has(HDR_PROXY_AUTHENTICATE))
-        buf.Printf("Proxy-Authenticate: %s\r\n",
-                   virgin.header->header.getByName("Proxy-Authenticate").unsafeBuf());
+    if (virgin.header->header.has(HDR_PROXY_AUTHENTICATE)) {
+        String vh=virgin.header->header.getByName("Proxy-Authenticate");
+        buf.Printf("Proxy-Authenticate: %.*s\r\n",
+                   vh.size(), vh.rawBuf());
+    }
 
-    if (virgin.header->header.has(HDR_PROXY_AUTHORIZATION))
-        buf.Printf("Proxy-Authorization: %s\r\n",
-                   virgin.header->header.getByName("Proxy-Authorization").unsafeBuf());
+    if (virgin.header->header.has(HDR_PROXY_AUTHORIZATION)) {
+        String vh=virgin.header->header.getByName("Proxy-Authorization");
+        buf.Printf("Proxy-Authorization: %.*s\r\n",
+                   vh.size(), vh.rawBuf());
+    }
 
     buf.Printf("Encapsulated: ");