The site has the following form (there is no possibility to change the form):
<form method="post" action="/login.pl" enctype="multipart/form-data" name="login_form"> <table> <tr> <td">Логин:</td> <td><input type="text" name="user" maxlength="32" /></td> </tr> <tr> <td">Пароль:</td> <td><input type="password" name="password" maxlength="32" /></td> </tr> <tr> <td /> <td><input type="submit" name="submit" value="Войти" /></td> </tr> </table> <input type="hidden" name="return" value="//site.ru/index.pl"/> </form> Using HttpURLConnection, I send multipartr POST request. I control sending the request using WireShark. Not one, but three requests are sent. As a result of authorization does not occur. If, on the other hand, I make a request via port 80 via telnet, then everything is fine, I receive, for example, Cookie: SID = 8908925884138574, which is what I need.