[cpp-xmltooling COMMIT] /branches/REL_1/xmltooling/util/CurlURLInputStream.cpp

noreply at shibboleth.net noreply at shibboleth.net
Fri Feb 10 19:50:31 GMT 2012


Author: scantor
Date: Fri Feb 10 19:50:30 2012
New Revision: 960

URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=960&view=rev
Log:
https://issues.shibboleth.net/jira/browse/CPPXT-83

Modified:
    branches/REL_1/xmltooling/util/CurlURLInputStream.cpp

Modified: branches/REL_1/xmltooling/util/CurlURLInputStream.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/util/CurlURLInputStream.cpp?rev=960&r1=959&r2=960&view=diff
==============================================================================
--- branches/REL_1/xmltooling/util/CurlURLInputStream.cpp (original)
+++ branches/REL_1/xmltooling/util/CurlURLInputStream.cpp Fri Feb 10 19:50:30 2012
@@ -75,7 +75,7 @@
     size_t curl_header_hook(void* ptr, size_t size, size_t nmemb, void* stream)
     {
         // only handle single-byte data
-        if (size!=1 || nmemb<5 || !stream)
+        if (size != 1 || nmemb < 5 || !stream)
             return nmemb;
         string* cacheTag = reinterpret_cast<string*>(stream);
         const char* hdr = reinterpret_cast<char*>(ptr);
@@ -117,9 +117,9 @@
                 }
                 break;
             }
-            // append until whitespace
+            // append until data's gone or we see a CR/LF
             while (remaining > 0) {
-                if (!isspace(*hdr)) {
+                if (*hdr != '\r' && *hdr != '\n') {
                     (*cacheTag) += *hdr++;
                     --remaining;
                     continue;



More information about the commits mailing list