Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML-RPCのエラー #215

Open
yurikadoi opened this issue Dec 12, 2015 · 3 comments
Open

XML-RPCのエラー #215

yurikadoi opened this issue Dec 12, 2015 · 3 comments

Comments

@yurikadoi
Copy link

mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ telnet xmlrpc-c.sourceforge.net 80
Trying 216.34.181.96...
Connected to xmlrpc-c.sourceforge.net.
Escape character is '^]'.
POST /api/sample.php  HTTP/1.0
User-Agent: Test/0.0
Host: xmlrpc-c.sourceforge.net
Content-Type: text/xml
Content-length: 130

<?xml version="1.0"?>
<methodCall>
    <methodName>system.listMethods</methodName>
    <params></params>
    </methodCall>
HTTP/1.1 503 Service Unavailable
Server: Varnish
Retry-After: 0
Content-Type: text/html; charset=utf-8
Content-Length: 418
Date: Sat, 12 Dec 2015 17:12:29 GMT
X-Varnish: 501920015
Age: 6
Via: 1.1 varnish
Connection: close


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>503 Service Unavailable</title>
  </head>
  <body>
    <h1>Error 503 Service Unavailable</h1>
    <p>Service Unavailable</p>
    <h3>Guru Meditation:</h3>
    <p>XID: 501920015</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>
Connection closed by foreign host.

カットアンドペイストではなく手打ちしてもだめです

@k-okada
Copy link
Owner

k-okada commented Dec 13, 2015

$ telnet xmlrpc-c.sourceforge.net 80
Trying 216.34.181.96...
Connected to xmlrpc-c.sourceforge.net.
Escape character is '^]'.
POST /api/sample.php  HTTP/1.0
User-Agent: Test/0.0
Host: xmlrpc-c.sourceforge.net
Content-Type: text/xml
Content-length: 130

<?xml version="1.0"?>
<methodCall>
    <methodName>system.listMethods</methodName>
    <params></params>
    </methodCall>

HTTP/1.1 200 OK
Server: Apache/2.2.15 (CentOS)
Vary: Host
Cache-Control: max-age=172800
Expires: Tue, 15 Dec 2015 08:43:47 GMT
Content-Type: text/xml
Content-Length: 470
Date: Sun, 13 Dec 2015 08:43:48 GMT
X-Varnish: 201556757
Age: 0
Via: 1.1 varnish
Connection: close

<?xml version="1.0"?>
<!-- DEBUG INFO:



-->
<methodResponse>
<params>
<param>
<value><array>
<data>
<value><string>sample.add</string></value>
<value><string>debug.authInfo</string></value>
<value><string>sample.sumAndDifference</string></value>
<value><string>system.listMethods</string></value>
<value><string>system.methodHelp</string></value>
<value><string>system.methodSignature</string></value>
</data>
</array></value>
</param>
</params>
</methodResponse>

ふーん,うまくいったけどなぁ.

@k-okada
Copy link
Owner

k-okada commented Dec 13, 2015

post.txt というファイルを作っておいて,以下のコマンドで動けば,内容は間違えていないので,
telnet してコピペしても動くと思います.

k-okada@kokada-t440s:/tmp$ cat post.txt
POST /api/sample.php  HTTP/1.0
User-Agent: Test/0.0
Host: xmlrpc-c.sourceforge.net
Content-Type: text/xml
Content-length: 130

<?xml version="1.0"?>
<methodCall>
    <methodName>system.listMethods</methodName>
    <params></params>
</methodCall>











k-okada@kokada-t440s:/tmp$ cat post.txt | nc xmlrpc-c.sourceforge.net 80
HTTP/1.1 200 OK
Server: Apache/2.2.15 (CentOS)
Vary: Host
Cache-Control: max-age=172800
Expires: Tue, 15 Dec 2015 08:48:23 GMT
Content-Type: text/xml
Content-Length: 470
Date: Sun, 13 Dec 2015 08:48:23 GMT
X-Varnish: 1000992271
Age: 0
Via: 1.1 varnish
Connection: close

<?xml version="1.0"?>
<!-- DEBUG INFO:



-->
<methodResponse>
<params>
<param>
<value><array>
<data>
<value><string>sample.add</string></value>
<value><string>debug.authInfo</string></value>
<value><string>sample.sumAndDifference</string></value>
<value><string>system.listMethods</string></value>
<value><string>system.methodHelp</string></value>
<value><string>system.methodSignature</string></value>
</data>
</array></value>
</param>
</params>
</methodResponse>




@yurikadoi
Copy link
Author

先生ご回答ありがとうございます。
post.txtをつくってコピペしてみてもだめです。
また授業後に質問させていただきます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants