- 追加された行はこの色です。
- 削除された行はこの色です。
[[Axis1.1のHTTP Protocol Log>Webサービス/inter-operability#content_1_2]]を見てもわかるように、Axis1.1のHTTPレスポンスのHTTP HeaderにはContent-Lengthが付いていません。これがたまに問題になることがあるようです。
*** HTTPの規約では?
[[RFC2068:http://www.mars.dti.ne.jp/~torao/rfc/rfc2068-ja.html]]の4.4項には、HTTP message-bodyの長さの決定方法が記載されています。
+ message-bodyを含んではいけない全てのレスポンスメッセージの場合
+ Transfer-Encoding: chunked が適応されている場合
+ Content-Length: が設定されている場合
+ メディアタイプが "multipart/byteranges"の場合
+ 接続を閉じるサーバによる場合
で、Axisのレスポンスは
HTTP/1.1 200 OK
Content-Type: text/xml;charset=utf-8
Date: Sun, 04 Jan 2004 16:11:01 GMT
Server: Apache-Coyote/1.1
Connection: close
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<helloWorldReturn xmlns="http://test">こんにちは、世界</helloWorldReturn>
</soapenv:Body>
</soapenv:Envelope>
ってことで、
ってことで、Keep-Aliveを終了する
Connection: close
の部分が、5番に対応するのかしら? とにかくどうして「Context-Length」かもしくは「Transfer-Encoding: chunked」が設定されていないのかしら?お行儀悪い。
*** Axisの開発者はどう考えてるの?
AxisServletの1005行目ぐらいには、
/* My understand of Content-Length
* HTTP 1.0
* -Required for requests, but optional for responses.
* HTTP 1.1
* - Either Content-Length or HTTP Chunking is required.
* Most servlet engines will do chunking if content-length is not specified.
*/
//if(clientVersion == HTTPConstants.HEADER_PROTOCOL_V10) //do chunking if necessary.
// res.setContentLength(responseMsg.getContentLength());
な~んて記述がありますね。「ほとんどのServletエンジンはContent-lengthが指定されてなければ、chunkするでしょ」ということでしょうか?
で、そうしないようなHTTP関連アプリやProxyサーバなどで問題が発生しているわけですね。