DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39220>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39220





------- Additional Comments From [EMAIL PROTECTED]  2006-06-15 15:46 -------
You also need to override the inherited method #addRequestHeaders otherwise
there is no Content-Length nor Transfer-Encoding header, and some server does 
not like that.

    /**
     * Overrides the inherited method to add a header "Transfer-Encoding: 
     * chunked" if the content-length has not been already set, as expected by 
     * the method writeRequestBody.
     *  
     * @see #writeRequestBody
     */
    protected void addRequestHeaders(HttpState state, HttpConnection conn)
    throws IOException, HttpException {
      super.addRequestHeaders(state, conn);
      if (isHttp11() && getRequestHeader("Content-Length")==null) {
        int len = getRequestContentLength();
        if (len>=0){
          setRequestHeader("Content-Length", String.valueOf(len));
        }
        else setRequestHeader("Transfer-Encoding", "chunked");
      }
    }


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to