WCF Content-Length HTTP header on outbound message

前端 未结 3 681
悲哀的现实
悲哀的现实 2020-12-19 20:57

I\'m in a tough situation in which a Java web service endpoint hosted on an IBM HTTP Server (IHS) requires a Content-Length header, although it supposedly conforms to HTTP/1

3条回答
  •  天涯浪人
    2020-12-19 21:41

    Figured it out. Setting the binding to use transferMode="Streamed" was causing a Transfer-Encoding: chunked. We needed streamed transfers due to very large responses from the web service, so I was able to go with:

    Bad:

    transferMode="Streamed"
    

    Good:

    transferMode="StreamedResponse"
    

    Changing the binding to this solved the problem:

    
        
          
          
        
      
    

提交回复
热议问题