Wants to access the content length, content Type from the WCC public document url using whatsup. please suggest how to achieve it.
Using "Whatsup" , as in "WhatsApp"? If so, there is no way to do that from OOTB mechanism.
Thanks for the reply, need your valuable input on top of this
Actually using Curl want to show the image on whats-up and when they are accessing the other image url using Curl they are getting the content Length and Content Type in the Response but when they are trying to access the WCC Public document url they are getting only the content-Type in response but content Length is not coming in response as shown in below image
Kindly suggest how we can modify these response value so that it can show content-length there.
What do you see when using -i option instead of -I while running curl command ?
Access the web layout url from browser and prior to running it launch developer console on Chrome or FF . Once the url is launched and the content is displayed , select the url that is listed under Network tab - right click - Copy - Copy as cUrl(cmd) .
Run this command as is from Command line and see what the output is listed .
From developer console - highlight the earlier url and right side - Headers check if Content-Length is being listed or not .
It looks like the lb in your case is not passing the content-length in response because by default when accessing the native host of wcc it does give the value .
For eg : curl -I http://<native ucmhost>:16200/cs//groups/public/documents/system/zgnv/mde0/~edisp/abcd.png gives the following response :
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Date: Thu, 21 Nov 2019 07:51:16 GMT
Last-Modified: Wed, 13 Nov 2019 06:21:28 GMT
Set-Cookie: JSESSIONID=vv1GdWBJBz6568S7t2XGn1kvQY3llnQyhZJnQKYSjjW9lLb2y3j7!-1108908390; path=/; HttpOnly
X-Powered-By: Servlet/2.5 JSP/2.1
Thanks for immediate reply, I have verified in Dev/SIT environment it's returning the content length for PDF file only but for images it's not returning the content length.
but the same is not applicable for UAT and Prod environment Node as well LB or Published url also where it's a cluster environment. attaching the screenshots for more information.
Kindly suggest how we can do this.
If you see for the png / image files in the browser development console Transfer-Encoding is set to chunked. And in such cases where Transfer-Encoding is set in response, it will not list content-length.
This is more to do with the http responses and file types than webcenter content application.
Thanks a lot for the help, just want to understand is there any possibility to send the content-length in response header?
Seen some document in support which stating that we can disable transfer encoding property in WebLogic server but even though it's not working and a bug has been raised for the same.
How to Change the WebLogic Server Setting to Disable Chunked Encoding: chunked-transfer-disabled (Doc ID 1500899.1)
Bug 13810493 : CONTENT-LENGTH IS NOT ADDED IN HTTP HEADERS WHEN CHUNKEDTRANSFERDISABLED IS TRUE
just want to understand is there any possibility to send the content-length in response header?
I guess you can check the the article and test in on your environment to see if after disabling the property content-length comes in response or not.
Another reference that you can review and see if it can be done to achieve the requirement.
1 person found this helpful
I would caution against using "localhost" as the base URL for these kinds of tests. Sometimes the browser (and server response) are slightly different since localhost in many cases may/may not be considered a "safe" host, and may return different header data. A case in point, Some versions of Chrome will not render URLs with "localhost" or "localhost.localdomain" as Chrome considers those hosts a security risk.
Thanks for support, I got the answer from this and reason behind why this Transfer-Encoding is set to chunked.
Actually whenever file size is greater than 512 KB By default it will set to chunked whenever we are transferring the data to network.
we can get the content-length in response if file size is less than 512kb.
using curl if we want to get the content-length we need to use the below commands
curl -i document url
curl -v document url
instead of curl -I document url.