Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Jakarta Commons HttpClient and a socket reset

Reply
Thread Tools

Jakarta Commons HttpClient and a socket reset

 
 
Joe Linux
Guest
Posts: n/a
 
      09-15-2006
Hi,

This is not a question : this is a possible answer on a problem you may
have.

I you use httpclient and you set the content-length header incorrectly
while you post an application/x-www-form-urlencoded form (it's the
default), httpclient won't fix it for you - there are good reasons for
this.

In the case you post, say, 100 bytes
(variable=value&variable2=value2&...) and set the content-length header
to 101, the server will wait untill it reach a timetout for the 101st
byte.

It may seem obvious but in the case i saw, for a reverse proxy, a
particuliar client post a value and urlencoded the dash "-" as %2d -
The reverse proxy "silently" urldecoded this as "-", and so modified
the length of the posted string without modifying the content-length
which it forwarwed to the proxyied servers untouched. And these one
blocked, waiting for 2 other bytes that never came.

Hope this helps someone...

Denis Valdenaire

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set cipher-suite in commons httpclient the_caspie@hotmail.com Java 2 08-29-2005 12:26 PM
Jakarta Commons FileUpload and only *Partially* uploaded files Dundonald Java 2 03-23-2005 02:46 PM
Jakarta Commons FileUpload and only *Partially* uploaded files Dundonald Java 0 03-22-2005 03:21 PM
Importing Hotmail Addressbook from Java Client using commons-httpclient APIs Gamas Java 0 02-04-2005 11:50 PM
jakarta commons file upload and store to mysql Joshua Java 0 10-20-2004 05:21 PM



Advertisments