bugfix to order HTTP request headers properly, updated the user agent for SPA over HTTP to use the options->http_user_agent variable (can be set from the command line)
git-svn-id: file:///home/mbr/svn/fwknop/trunk@120 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
parent
868aa6ee37
commit
9bc2b1539e
@ -368,17 +368,15 @@ send_spa_packet_http(char *spa_data, int sd_len, fko_cli_options_t *options)
|
||||
}
|
||||
|
||||
snprintf(http_buf, HTTP_MAX_REQUEST_LEN,
|
||||
"%s %s %s\r\n%s %s\r\n%s %s%s\r\n%s\r\n\r\n",
|
||||
"%s%s%s%s%s%s%s",
|
||||
"GET ",
|
||||
spa_data,
|
||||
"HTTP/1.0",
|
||||
"Host:",
|
||||
" HTTP/1.0\r\nUser-Agent: ",
|
||||
options->http_user_agent,
|
||||
"\r\nAccept: */*\r\nHost: ",
|
||||
options->spa_server_str, /* hostname or IP */
|
||||
"User-Agent:",
|
||||
"Fwknop/",
|
||||
MY_VERSION,
|
||||
"Accept: */*",
|
||||
"Connection: Keep-Alive");
|
||||
"\r\nConnection: Keep-Alive\r\n\r\n"
|
||||
);
|
||||
|
||||
return send_spa_packet_tcp_or_udp(http_buf, strlen(http_buf), options);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user