The site from the java web server does not work in iOS browsers

I am new to the Java Server theme and decided to write my web server in java, on a clean java.net with ServerSocket. The server itself works properly on Windows, Linux, and Android operating systems in all browsers. But there were problems with iOS. All browsers on iOS display the site as text, without converting it.

A brief explanation of how the server works.

Получаем запрос от клиента(InputStream). 
Преобразуем в строку. 
Находим нужный .html файл. 
Считываем текст из файла.
Добавляем текст из файла к http заголовоку.
Преобразуем все .getBytes(StandardCharsets.UTF_8);
Отправляем клиенту(браузеру)(OutputStream);

Http header:

HTTP/1.x 200 OK 
Cache-Control: max-age=3600, must-revalidate 
Connection: keep-alive 
Content-Type: text/html; charset=utf-8; charset=UTF-8 
Content-Length: 12243

Text

How do I fix this?

Author: Ryabinin NIkolay, 2020-03-01

1 answers

The problem was in the http header. The iOS web browser engine does not perceive the protocol version as HTTP/1.x. You need to issue the exact version of the HTTP/1.1 type.

 1
Author: Ryabinin NIkolay, 2020-03-04 12:20:01