[cpp-xmltooling COMMIT] /branches/REL_1/xmltooling/io/HTTPResponse.cpp
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jan 8 22:25:56 EST 2015
Author: scantor
Date: Thu Jan 8 22:25:56 2015
New Revision: 1038
URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=1038&view=rev
Log:
https://issues.shibboleth.net/jira/browse/CPPXT-97
Modified:
branches/REL_1/xmltooling/io/HTTPResponse.cpp
Modified: branches/REL_1/xmltooling/io/HTTPResponse.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/io/HTTPResponse.cpp?rev=1038&r1=1037&r2=1038&view=diff
==============================================================================
--- branches/REL_1/xmltooling/io/HTTPResponse.cpp (original)
+++ branches/REL_1/xmltooling/io/HTTPResponse.cpp Thu Jan 8 22:25:56 2015
@@ -95,14 +95,18 @@
void HTTPResponse::setResponseHeader(const char* name, const char* value)
{
- for (const char* ch=name; *ch; ++ch) {
- if (iscntrl(*ch))
- throw IOException("Response header name contained a control character.");
+ if (name) {
+ for (const char* ch=name; *ch; ++ch) {
+ if (iscntrl(*ch))
+ throw IOException("Response header name contained a control character.");
+ }
}
- for (const char* ch=value; *ch; ++ch) {
- if (iscntrl(*ch))
- throw IOException("Value for response header ($1) contained a control character.", params(1,name));
+ if (value) {
+ for (const char* ch=value; *ch; ++ch) {
+ if (iscntrl(*ch))
+ throw IOException("Value for response header ($1) contained a control character.", params(1,name));
+ }
}
}
More information about the commits
mailing list