Merge pull request #155 from rhansen/content-type-header
Fix regex searching for Content-Type header
This commit is contained in:
commit
1d78f5fbe3
1 changed files with 1 additions and 1 deletions
2
ddclient
2
ddclient
|
@ -2046,7 +2046,7 @@ sub geturl {
|
||||||
$request .= "Authorization: Basic $auth\n" if $login || $password;
|
$request .= "Authorization: Basic $auth\n" if $login || $password;
|
||||||
$request .= "User-Agent: ${program}/${version}\n";
|
$request .= "User-Agent: ${program}/${version}\n";
|
||||||
if ($data) {
|
if ($data) {
|
||||||
$request .= "Content-Type: application/x-www-form-urlencoded\n" if !$headers =~ /^Content-Type: /;
|
$request .= "Content-Type: application/x-www-form-urlencoded\n" if $headers !~ /^Content-Type:/mi;
|
||||||
$request .= "Content-Length: " . length($data) . "\n";
|
$request .= "Content-Length: " . length($data) . "\n";
|
||||||
}
|
}
|
||||||
$request .= "Connection: close\n";
|
$request .= "Connection: close\n";
|
||||||
|
|
Loading…
Reference in a new issue