| 5 | #include <util/stream/null.h> |
| 6 | |
| 7 | bool THttpClientRequestExtension::Parse(char* req, TBaseServerRequestData& rd) { |
| 8 | rd.SetSocket(Socket()); |
| 9 | |
| 10 | if (!rd.Parse(req)) { |
| 11 | Output() << "HTTP/1.1 403 Forbidden\r\n" |
| 12 | "Content-Type: text/plain\r\n" |
| 13 | "Content-Length: 39\r\n" |
| 14 | "\r\n" |
| 15 | "The server cannot be used as a proxy.\r\n"; |
| 16 | |
| 17 | return false; |
| 18 | } |
| 19 | |
| 20 | return true; |
| 21 | } |
| 22 | |
| 23 | bool THttpClientRequestExtension::ProcessHeaders(TBaseServerRequestData& rd, TBlob& postData) { |
| 24 | for (const auto& header : ParsedHeaders) { |