spdycat: disallow empty header name with -H

This commit is contained in:
Tatsuhiro Tsujikawa 2012-08-21 21:39:33 +09:00
parent 2266b102e3
commit ccf225641e
1 changed files with 1 additions and 1 deletions

View File

@ -717,7 +717,7 @@ int main(int argc, char **argv)
case 'H': {
char *header = optarg;
char *value = strchr( optarg, ':' );
if ( ! value ) {
if ( ! value || header == value) {
std::cerr << "-H: invalid header: " << optarg
<< std::endl;
exit(EXIT_FAILURE);