aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/http_ex.cpp
diff options
context:
space:
mode:
authorbarkovbg <barkovbg@yandex-team.com>2022-10-24 10:33:48 +0300
committerbarkovbg <barkovbg@yandex-team.com>2022-10-24 10:33:48 +0300
commited05064c1fcbd3ef77a10ebf64fcd048ebe8190b (patch)
treef1fd0770d798a28627cb0d62719a145825dae136 /library/cpp/http/server/http_ex.cpp
parent534bec06db9563742c1e284358b134adfd965f51 (diff)
downloadydb-ed05064c1fcbd3ef77a10ebf64fcd048ebe8190b.tar.gz
[external_abt]fix uaas 5xx
Diffstat (limited to 'library/cpp/http/server/http_ex.cpp')
-rw-r--r--library/cpp/http/server/http_ex.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/cpp/http/server/http_ex.cpp b/library/cpp/http/server/http_ex.cpp
index e07db22bfc..c742eecb3b 100644
--- a/library/cpp/http/server/http_ex.cpp
+++ b/library/cpp/http/server/http_ex.cpp
@@ -34,6 +34,7 @@ bool THttpClientRequestExtension::ProcessHeaders(TBaseServerRequestData& rd, TBl
Put,
Patch,
Delete,
+ Options,
};
enum EMethod foundMethod;
@@ -54,6 +55,9 @@ bool THttpClientRequestExtension::ProcessHeaders(TBaseServerRequestData& rd, TBl
} else if (strnicmp(s, "DELETE ", 7) == 0) {
foundMethod = Delete;
urlStart = s + 7;
+ } else if (strnicmp(s, "OPTIONS ", 8) == 0) {
+ foundMethod = Options;
+ urlStart = s + 8;
} else {
foundMethod = NotImplemented;
}
@@ -98,6 +102,10 @@ bool THttpClientRequestExtension::ProcessHeaders(TBaseServerRequestData& rd, TBl
}
break;
+ case Options:
+ Output() << "HTTP/1.1 405 Method Not Allowed\r\n\r\n";
+ return false;
+
case NotImplemented:
Output() << "HTTP/1.1 501 Not Implemented\r\n\r\n";
return false;