-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object Storage copy method - Content-Length header already present #872
Comments
Content-Length header already present? Worth to turn on debug logging to see the request by |
Hi Arno, I noticed that i'm already using the option 'OSFactory.enableHttpLoggingFilter(true);' yet . So using:
With this version the error message is different, now it's 'Missing Content-Length header.', as reported:
Thanks in advice for any help. |
Compared to the API http://developer.openstack.org/api-ref/object-storage/?expanded=copy-object-detail#copy-object the request looks good, doesn't it? Does this work via swift- or openstack client? |
Hi Arno, This the request, reading log:
and this is the response, from log:
If the request were correct the response should be different, somethings like I tried to replicate the error This is what happening: Logged Request('Content-Length: 0' is ok):
Actual Request('Content-Length: 0' is missing):
Logged Response:
Actual Response:
In this case there is a match between simulated and actual environment. Looks around I found some reference about an issue (according someone) or feature (according others) about the use of "Content-Length" by Jersey and Apache Connector. May be something related to this issue: Thanks for any tips, ###updated If I use the following request all goes fine: Request:
Response:
|
Summing up: Content-Length header missing in the actual request using Jersey and Apache connector. Right? |
Thanks for the tip, it's working now! Only for the records:
Regards, |
Hi,
I encountered an issue with this 'copy' method:
I received this error:
Exception in thread "main" ConnectionException{status=0} at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:56) at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.execute(HttpExecutorServiceImpl.java:30) at org.openstack4j.core.transport.internal.HttpExecutor.execute(HttpExecutor.java:51) at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.executeWithResponse(BaseOpenStackService.java:197) at org.openstack4j.openstack.storage.object.internal.ObjectStorageObjectServiceImpl.copy(ObjectStorageObjectServiceImpl.java:173) at inebula.openstack.identity.test(identity.java:240) at inebula.openstack.identity.main(identity.java:282) Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:182) at org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:438) at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:688) at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:694) at org.openstack4j.connectors.resteasy.HttpCommand.execute(HttpCommand.java:65) at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invokeRequest(HttpExecutorServiceImpl.java:61) at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:54) ... 6 more Caused by: org.apache.http.ProtocolException: **Content-Length header already present** at org.apache.http.protocol.RequestContent.process(RequestContent.java:67) at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108) at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:462) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
Version:
<dependency> <groupId>org.pacesys</groupId> <artifactId>openstack4j</artifactId> <version>3.0.2</version> </dependency>
Please let me know how I can provide more details.
Regards,
lilloxxx
The text was updated successfully, but these errors were encountered: