uploads failing using chunked transfer encoding

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

uploads failing using chunked transfer encoding

Postby rupello » Apr 28 09 2:58 am

I have a client that is trying to HTTP POST a file upload using chunked transfer encoding via the WinGate HTTP proxy

The upload is failing (when using the WinGate proxy) with the response
Code: Select all
HTTP/1.0 411 Length Required


This behavior can be reproduced using the cURL utility

rem ** this works (192.168.1.213 is my proxy)
Code: Select all
curl --form "upfile=@test.dat" <upload url> --verbose --proxy "192.168.1.213:80"


rem ** this fails
Code: Select all
curl --form "upfile=@test.dat" --header "Transfer-Encoding: chunked" <upload url> --verbose --proxy "192.168.1.213:80"


I would appreciate any suggestions to get this working; unfortunately we can't modify the client to use non-chunked encoding

Rupert
rupello
 
Posts: 2
Joined: Apr 28 09 2:46 am

Re: uploads failing using chunked transfer encoding

Postby adrien » Apr 28 09 10:04 am

try this one

http://www.wingate.com/downloads/WinGat ... 70-USE.EXE

It supports chunked message bodies from clients. I think that "411 Length required" error came from the server, but it's possible the Transfer-Encoding header was removed with the version you were using.

Chunked uploads are very unusual, and can be very problematic. Only HTTP/1.1 supports chunking, so if a client sends chunked requests to a server, every agent in the path must support chunking or the prior one has to spool the entire upload before presenting it to the HTTP/1.0 agent. Unless you know in advance that the entire path supports chunking, and you don't know how big a file you are uploading is (how likely is that?), then it's generally safer to avoid chunked requests. It also means that decisions can't be made in intermediaries based on the size of the file being uploaded, since you don't know until you read it all how big it will be (as a proxy).

What client software is this?

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: uploads failing using chunked transfer encoding

Postby adrien » Apr 28 09 10:47 am

p.s. I'm concerned you get an HTTP/1.0 reply. I presume that's coming from the server.

So even if the proxy supports chunked uploads, you still will be out of luck because it looks like the server is only HTTP/1.0

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: uploads failing using chunked transfer encoding

Postby rupello » Apr 29 09 10:08 am

Thanks adrien,

I upgraded to 6.5.3 and the chunked uploads are now working (and I'm receiving HTTP 1.1 responses)

FYI; The client is a mobile Java app running on a mobile phone.

Rupert
rupello
 
Posts: 2
Joined: Apr 28 09 2:46 am


Return to WinGate

Who is online

Users browsing this forum: No registered users and 4 guests