Some providers (specifically HP Cloud and Google Cloud Storage) do not properly support Expect: 100-continue headers. JDK7 is stricter in its handling of the Expect header than JDK6 -- in particular, it expects servers to properly respond to an expect header and times out only if a prior timeout did not exist on the underlying HTTP connection. As a result, JDK7 tests against these providers hang and fail.
This commit introduces a new filter -- appropriate called StripExpectHeader -- that is controlled by the property jclouds.strip-expect-header. The property defaults to false to preserve existing behavior but allows applications to tweak Expect header handling. Tested by running HPCS live tests with JDK7 -- previously most of these tests would fail with timeouts. Closes JCLOUDS-181 You can merge this Pull Request by running: git pull https://github.com/maginatics/jclouds feature/100-continue Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds/pull/65 -- Commit Summary -- * Introduce StripExpectHeader filter and a property to control it. -- File Changes -- M core/src/main/java/org/jclouds/Constants.java (5) M core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java (3) A core/src/main/java/org/jclouds/http/filters/StripExpectHeader.java (34) M core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java (10) -- Patch Links -- https://github.com/jclouds/jclouds/pull/65.patch https://github.com/jclouds/jclouds/pull/65.diff
