1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-07 22:29:19 +00:00

01_FHEMWEB.pm: fix return text for HTTP 405

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@13139 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-01-18 10:08:27 +00:00
parent 67dc235248
commit 488ef6d2ee

View File

@ -422,9 +422,9 @@ FW_Read($$)
# Return 200 for OPTIONS or 405 for unsupported method
my ($method, $arg, $httpvers) = split(" ", $FW_httpheader[0], 3);
if($method !~ m/^(GET|POST)$/i){
my $retCode = ($method eq "OPTIONS") ? 200 : 405;
my $retCode = ($method eq "OPTIONS") ? "200 OK" : "405 Method Not Allowed";
TcpServer_WriteBlocking($FW_chash,
"HTTP/1.1 $retCode OK\r\n" .
"HTTP/1.1 $retCode\r\n" .
$FW_headerlines.
"Content-Length: 0\r\n\r\n");
delete $hash->{CONTENT_LENGTH};