Skip to main content

Transfer-Encoding: chunked

2 replies [Last post]
Anonymous

Hi everyone,

I am writing a http client that sends files to a server. When I send a
request from the client to the server that is greater than 2048 bytes
the header Transfer-Encoding: chunked is added and the Content-Length
header is removed. The server is unable to respond when this happens.
Is there a way of not making this header be set? I am not using flush()
and I am using close() to close the output stream once the data is
written. I have also tried the header Connection: close but the client
still sent the Transfer-Encoding: chunked header.
Is it possible to set the client to use HTTP 1.0?

Thanks
Ian

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ward Willats

Oh, and if you are using Resin or something you have to explicitly
turn chunked transfer on. There is an Apache config param
(REQUEST_CHUNKED_ERROR) a POST handling Apache module can call to
enable it -- lots of old servers had it disabled because of security
exploits several years ago, not a problem now.

-- Ward

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Ward Willats

At 07:44 AM 7/25/2007, you wrote:
>Is it possible to set the client to use HTTP 1.0?

AFAIK, only in the WTK emulator can you set this. Otherwise your
server must support HTTP/1.1 for any general mobile deployment.

-- Ward

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".