Skip to content

Commit

Permalink
КакТекст возвращает пустую строку (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
asosnoviy authored Mar 12, 2020
1 parent 5865ff4 commit ec8bca7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CommonModules/КоннекторHTTP/Ext/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@
Текст = ЧтениеТекста.Прочитать();
ЧтениеТекста.Закрыть();

Если Текст = Неопределено Тогда
Текст = "";
КонецЕсли;

Возврат Текст;

КонецФункции
Expand Down
3 changes: 3 additions & 0 deletions src/DataProcessors/Тесты/Ext/ObjectModule.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@

Результат = КоннекторHTTP.КакТекст(КоннекторHTTP.Get("http://httpbin.org/encoding/utf8"));
УтверждениеВерно(СтрНайти(Результат, "Зарегистрируйтесь сейчас на Десятую Международную"), 3931);

Результат = КоннекторHTTP.КакТекст(КоннекторHTTP.Get("http://httpbin.org/status/200"));
УтверждениеВерно(Результат = "", Истина);

ТестПройден("Тест_РезультатКакТекст");

Expand Down

0 comments on commit ec8bca7

Please # to comment.