[英]How to pass username and password in authorization field?
In unrealscript, I'm attempting to connect to server using a TCPLink client I wrote. 在虚幻脚本中,我试图使用我编写的TCPLink客户端连接到服务器。 I can connect to the domain, but when I attempt to access a welcome message I receive a 401 error.
我可以连接到域,但是当我尝试访问欢迎消息时,出现401错误。 What am I doing wrong in my authorization field?
授权字段中我在做什么错?
Note: username and password are plain-text string variables filled in by the user 注意:用户名和密码是用户填写的纯文本字符串变量
SendText("GET /crud/welcome HTTP/1.0"$chr(13)$chr(10));
SendText("Host: "$TargetHost$chr(13)$chr(10));
SendText("Authorization: "$USERNAME$":"$PASSWORD$chr(13)$chr(10));
SendText("Connection: Close"$chr(13)$chr(10));
SendText(chr(13)$chr(10));
您可能需要阅读RFC 2617。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.