Commit 293b717b authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp: Fix bug that -H does not allow single letter header name

parent 078b1de1
...@@ -1957,7 +1957,7 @@ int main(int argc, char **argv) ...@@ -1957,7 +1957,7 @@ int main(int argc, char **argv)
char *header = optarg; char *header = optarg;
// Skip first possible ':' in the header name // Skip first possible ':' in the header name
char *value = strchr( optarg + 1, ':' ); char *value = strchr( optarg + 1, ':' );
if ( ! value || header + 1 == value) { if ( ! value || (header[0] == ':' && header + 1 == value)) {
std::cerr << "-H: invalid header: " << optarg std::cerr << "-H: invalid header: " << optarg
<< std::endl; << std::endl;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment